;--------------------------------------------------------
; File Created by SDCC : free open source ANSI-C Compiler
; Version 2.7.0 #4818 (May 31 2007)
; This file generated Mon Apr 30 18:24:08 2012
;--------------------------------------------------------
	.module cIPv6
	.optsdcc -mmcs51 --model-large
	
;--------------------------------------------------------
; Public variables in this module
;--------------------------------------------------------
	.globl _IRCON2_P2IF
	.globl _IRCON2_UTX0IF
	.globl _IRCON2_UTX1IF
	.globl _IRCON2_P1IF
	.globl _IRCON2_WDTIF
	.globl _CY
	.globl _AC
	.globl _F0
	.globl _RS1
	.globl _RS0
	.globl _OV
	.globl _F1
	.globl _P
	.globl _IRCON_DMAIF
	.globl _IRCON_T1IF
	.globl _IRCON_T2IF
	.globl _IRCON_T3IF
	.globl _IRCON_T4IF
	.globl _IRCON_P0IF
	.globl _IRCON_STIF
	.globl _IEN1_DMAIE
	.globl _IEN1_T1IE
	.globl _IEN1_T2IE
	.globl _IEN1_T3IE
	.globl _IEN1_T4IE
	.globl _IEN1_P0IE
	.globl _IEN0_RFERRIE
	.globl _IEN0_ADCIE
	.globl _IEN0_URX0IE
	.globl _IEN0_URX1IE
	.globl _IEN0_ENCIE
	.globl _IEN0_STIE
	.globl _IEN0_EA
	.globl _EA
	.globl _P2_4
	.globl _P2_3
	.globl _P2_2
	.globl _P2_1
	.globl _P2_0
	.globl _S0CON_ENCIF_0
	.globl _S0CON_ENCIF_1
	.globl _P1_7
	.globl _P1_6
	.globl _P1_5
	.globl _P1_4
	.globl _P1_3
	.globl _P1_2
	.globl _P1_1
	.globl _P1_0
	.globl _TCON_IT0
	.globl _TCON_RFERRIF
	.globl _TCON_IT1
	.globl _TCON_URX0IF
	.globl _TCON_ADCIF
	.globl _TCON_URX1IF
	.globl _P0_0
	.globl _P0_1
	.globl _P0_2
	.globl _P0_3
	.globl _P0_4
	.globl _P0_5
	.globl _P0_6
	.globl _P0_7
	.globl _P2DIR
	.globl _P1DIR
	.globl _P0DIR
	.globl _U1GCR
	.globl _U1UCR
	.globl _U1BAUD
	.globl _U1BUF
	.globl _U1CSR
	.globl _P2INP
	.globl _P1INP
	.globl _P2SEL
	.globl _P1SEL
	.globl _P0SEL
	.globl _ADCCFG
	.globl _PERCFG
	.globl _B
	.globl _T4CC1
	.globl _T4CCTL1
	.globl _T4CC0
	.globl _T4CCTL0
	.globl _T4CTL
	.globl _T4CNT
	.globl _RFIF
	.globl _IRCON2
	.globl _T1CCTL2
	.globl _T1CCTL1
	.globl _T1CCTL0
	.globl _T1CTL
	.globl _T1CNTH
	.globl _T1CNTL
	.globl _RFST
	.globl _ACC
	.globl _T1CC2H
	.globl _T1CC2L
	.globl _T1CC1H
	.globl _T1CC1L
	.globl _T1CC0H
	.globl _T1CC0L
	.globl _RFD
	.globl _TIMIF
	.globl _DMAREQ
	.globl _DMAARM
	.globl _DMA0CFGH
	.globl _DMA0CFGL
	.globl _DMA1CFGH
	.globl _DMA1CFGL
	.globl _DMAIRQ
	.globl _PSW
	.globl _T3CC1
	.globl _T3CCTL1
	.globl _T3CC0
	.globl _T3CCTL0
	.globl _T3CTL
	.globl _T3CNT
	.globl _WDCTL
	.globl _T2CON
	.globl _MEMCTR
	.globl _CLKCON
	.globl _U0GCR
	.globl _U0UCR
	.globl _T2CNF
	.globl _U0BAUD
	.globl _U0BUF
	.globl _IRCON
	.globl _SLEEP
	.globl _RNDH
	.globl _RNDL
	.globl _ADCH
	.globl _ADCL
	.globl _IP1
	.globl _IEN1
	.globl _RCCTL
	.globl _ADCCON3
	.globl _ADCCON2
	.globl _ADCCON1
	.globl _ENCCS
	.globl _ENCDO
	.globl _ENCDI
	.globl _FWDATA
	.globl _FCTL
	.globl _FADDRH
	.globl _FADDRL
	.globl _FWT
	.globl _IP0
	.globl _IEN0
	.globl _IE
	.globl _T2THD
	.globl _T2TLD
	.globl _T2CAPHPH
	.globl _T2CAPLPL
	.globl _T2OF2
	.globl _T2OF1
	.globl _T2OF0
	.globl _P2
	.globl _T2PEROF2
	.globl _T2PEROF1
	.globl _T2PEROF0
	.globl _S1CON
	.globl _IEN2
	.globl _HSRC
	.globl _S0CON
	.globl _ST2
	.globl _ST1
	.globl _ST0
	.globl _T2CMP
	.globl __XPAGE
	.globl _DPS
	.globl _RFIM
	.globl _P1
	.globl _P0INP
	.globl _P1IEN
	.globl _PICTL
	.globl _P2IFG
	.globl _P1IFG
	.globl _P0IFG
	.globl _TCON
	.globl _PCON
	.globl _U0CSR
	.globl _DPH1
	.globl _DPL1
	.globl _DPH0
	.globl _DPL0
	.globl _SP
	.globl _P0
	.globl _cipv6_pib
	.globl _RFD_SHADOW
	.globl _RFSTATUS
	.globl _CHIPID
	.globl _CHVER
	.globl _FSMTC1
	.globl _RXFIFOCNT
	.globl _IOCFG3
	.globl _IOCFG2
	.globl _IOCFG1
	.globl _IOCFG0
	.globl _SHORTADDRL
	.globl _SHORTADDRH
	.globl _PANIDL
	.globl _PANIDH
	.globl _IEEE_ADDR7
	.globl _IEEE_ADDR6
	.globl _IEEE_ADDR5
	.globl _IEEE_ADDR4
	.globl _IEEE_ADDR3
	.globl _IEEE_ADDR2
	.globl _IEEE_ADDR1
	.globl _IEEE_ADDR0
	.globl _DACTSTL
	.globl _DACTSTH
	.globl _ADCTSTL
	.globl _ADCTSTH
	.globl _FSMSTATE
	.globl _AGCCTRLL
	.globl _AGCCTRLH
	.globl _MANORL
	.globl _MANORH
	.globl _MANANDL
	.globl _MANANDH
	.globl _FSMTCL
	.globl _FSMTCH
	.globl _RFPWR
	.globl _CSPT
	.globl _CSPCTRL
	.globl _CSPZ
	.globl _CSPY
	.globl _CSPX
	.globl _FSCTRLL
	.globl _FSCTRLH
	.globl _RXCTRL1L
	.globl _RXCTRL1H
	.globl _RXCTRL0L
	.globl _RXCTRL0H
	.globl _TXCTRLL
	.globl _TXCTRLH
	.globl _SYNCWORDL
	.globl _SYNCWORDH
	.globl _RSSIL
	.globl _RSSIH
	.globl _MDMCTRL1L
	.globl _MDMCTRL1H
	.globl _MDMCTRL0L
	.globl _MDMCTRL0H
	.globl _cipv6_init
	.globl _cipv6_compress_mode
	.globl _cipv6_handle
	.globl _cipv6_check
	.globl _parse_hc1_message
	.globl _parse_mesh_packet
	.globl _build_lowpan_header
	.globl _add_own_address
	.globl _update_ip_sqn
	.globl _build_ipv6_header
	.globl _parse_ipv_header
	.globl _compare_ori_to_own
;--------------------------------------------------------
; special function registers
;--------------------------------------------------------
	.area RSEG    (DATA)
_P0	=	0x0080
_SP	=	0x0081
_DPL0	=	0x0082
_DPH0	=	0x0083
_DPL1	=	0x0084
_DPH1	=	0x0085
_U0CSR	=	0x0086
_PCON	=	0x0087
_TCON	=	0x0088
_P0IFG	=	0x0089
_P1IFG	=	0x008a
_P2IFG	=	0x008b
_PICTL	=	0x008c
_P1IEN	=	0x008d
_P0INP	=	0x008f
_P1	=	0x0090
_RFIM	=	0x0091
_DPS	=	0x0092
__XPAGE	=	0x0093
_T2CMP	=	0x0094
_ST0	=	0x0095
_ST1	=	0x0096
_ST2	=	0x0097
_S0CON	=	0x0098
_HSRC	=	0x0099
_IEN2	=	0x009a
_S1CON	=	0x009b
_T2PEROF0	=	0x009c
_T2PEROF1	=	0x009d
_T2PEROF2	=	0x009e
_P2	=	0x00a0
_T2OF0	=	0x00a1
_T2OF1	=	0x00a2
_T2OF2	=	0x00a3
_T2CAPLPL	=	0x00a4
_T2CAPHPH	=	0x00a5
_T2TLD	=	0x00a6
_T2THD	=	0x00a7
_IE	=	0x00a8
_IEN0	=	0x00a8
_IP0	=	0x00a9
_FWT	=	0x00ab
_FADDRL	=	0x00ac
_FADDRH	=	0x00ad
_FCTL	=	0x00ae
_FWDATA	=	0x00af
_ENCDI	=	0x00b1
_ENCDO	=	0x00b2
_ENCCS	=	0x00b3
_ADCCON1	=	0x00b4
_ADCCON2	=	0x00b5
_ADCCON3	=	0x00b6
_RCCTL	=	0x00b7
_IEN1	=	0x00b8
_IP1	=	0x00b9
_ADCL	=	0x00ba
_ADCH	=	0x00bb
_RNDL	=	0x00bc
_RNDH	=	0x00bd
_SLEEP	=	0x00be
_IRCON	=	0x00c0
_U0BUF	=	0x00c1
_U0BAUD	=	0x00c2
_T2CNF	=	0x00c3
_U0UCR	=	0x00c4
_U0GCR	=	0x00c5
_CLKCON	=	0x00c6
_MEMCTR	=	0x00c7
_T2CON	=	0x00c8
_WDCTL	=	0x00c9
_T3CNT	=	0x00ca
_T3CTL	=	0x00cb
_T3CCTL0	=	0x00cc
_T3CC0	=	0x00cd
_T3CCTL1	=	0x00ce
_T3CC1	=	0x00cf
_PSW	=	0x00d0
_DMAIRQ	=	0x00d1
_DMA1CFGL	=	0x00d2
_DMA1CFGH	=	0x00d3
_DMA0CFGL	=	0x00d4
_DMA0CFGH	=	0x00d5
_DMAARM	=	0x00d6
_DMAREQ	=	0x00d7
_TIMIF	=	0x00d8
_RFD	=	0x00d9
_T1CC0L	=	0x00da
_T1CC0H	=	0x00db
_T1CC1L	=	0x00dc
_T1CC1H	=	0x00dd
_T1CC2L	=	0x00de
_T1CC2H	=	0x00df
_ACC	=	0x00e0
_RFST	=	0x00e1
_T1CNTL	=	0x00e2
_T1CNTH	=	0x00e3
_T1CTL	=	0x00e4
_T1CCTL0	=	0x00e5
_T1CCTL1	=	0x00e6
_T1CCTL2	=	0x00e7
_IRCON2	=	0x00e8
_RFIF	=	0x00e9
_T4CNT	=	0x00ea
_T4CTL	=	0x00eb
_T4CCTL0	=	0x00ec
_T4CC0	=	0x00ed
_T4CCTL1	=	0x00ee
_T4CC1	=	0x00ef
_B	=	0x00f0
_PERCFG	=	0x00f1
_ADCCFG	=	0x00f2
_P0SEL	=	0x00f3
_P1SEL	=	0x00f4
_P2SEL	=	0x00f5
_P1INP	=	0x00f6
_P2INP	=	0x00f7
_U1CSR	=	0x00f8
_U1BUF	=	0x00f9
_U1BAUD	=	0x00fa
_U1UCR	=	0x00fb
_U1GCR	=	0x00fc
_P0DIR	=	0x00fd
_P1DIR	=	0x00fe
_P2DIR	=	0x00ff
;--------------------------------------------------------
; special function bits
;--------------------------------------------------------
	.area RSEG    (DATA)
_P0_7	=	0x0087
_P0_6	=	0x0086
_P0_5	=	0x0085
_P0_4	=	0x0084
_P0_3	=	0x0083
_P0_2	=	0x0082
_P0_1	=	0x0081
_P0_0	=	0x0080
_TCON_URX1IF	=	0x008f
_TCON_ADCIF	=	0x008d
_TCON_URX0IF	=	0x008b
_TCON_IT1	=	0x008a
_TCON_RFERRIF	=	0x0089
_TCON_IT0	=	0x0088
_P1_0	=	0x0090
_P1_1	=	0x0091
_P1_2	=	0x0092
_P1_3	=	0x0093
_P1_4	=	0x0094
_P1_5	=	0x0095
_P1_6	=	0x0096
_P1_7	=	0x0097
_S0CON_ENCIF_1	=	0x0099
_S0CON_ENCIF_0	=	0x0098
_P2_0	=	0x00a0
_P2_1	=	0x00a1
_P2_2	=	0x00a2
_P2_3	=	0x00a3
_P2_4	=	0x00a4
_EA	=	0x00af
_IEN0_EA	=	0x00af
_IEN0_STIE	=	0x00ad
_IEN0_ENCIE	=	0x00ac
_IEN0_URX1IE	=	0x00ab
_IEN0_URX0IE	=	0x00aa
_IEN0_ADCIE	=	0x00a9
_IEN0_RFERRIE	=	0x00a8
_IEN1_P0IE	=	0x00bd
_IEN1_T4IE	=	0x00bc
_IEN1_T3IE	=	0x00bb
_IEN1_T2IE	=	0x00ba
_IEN1_T1IE	=	0x00b9
_IEN1_DMAIE	=	0x00b8
_IRCON_STIF	=	0x00c7
_IRCON_P0IF	=	0x00c5
_IRCON_T4IF	=	0x00c4
_IRCON_T3IF	=	0x00c3
_IRCON_T2IF	=	0x00c2
_IRCON_T1IF	=	0x00c1
_IRCON_DMAIF	=	0x00c0
_P	=	0x00d0
_F1	=	0x00d1
_OV	=	0x00d2
_RS0	=	0x00d3
_RS1	=	0x00d4
_F0	=	0x00d5
_AC	=	0x00d6
_CY	=	0x00d7
_IRCON2_WDTIF	=	0x00ec
_IRCON2_P1IF	=	0x00eb
_IRCON2_UTX1IF	=	0x00ea
_IRCON2_UTX0IF	=	0x00e9
_IRCON2_P2IF	=	0x00e8
;--------------------------------------------------------
; overlayable register banks
;--------------------------------------------------------
	.area REG_BANK_0	(REL,OVR,DATA)
	.ds 8
;--------------------------------------------------------
; internal ram data
;--------------------------------------------------------
	.area DSEG    (DATA)
;--------------------------------------------------------
; overlayable items in internal ram 
;--------------------------------------------------------
	.area OSEG    (OVR,DATA)
;--------------------------------------------------------
; indirectly addressable internal ram data
;--------------------------------------------------------
	.area ISEG    (DATA)
;--------------------------------------------------------
; absolute internal ram data
;--------------------------------------------------------
	.area IABS    (ABS,DATA)
	.area IABS    (ABS,DATA)
;--------------------------------------------------------
; bit data
;--------------------------------------------------------
	.area BSEG    (BIT)
;--------------------------------------------------------
; paged external ram data
;--------------------------------------------------------
	.area PSEG    (PAG,XDATA)
;--------------------------------------------------------
; external ram data
;--------------------------------------------------------
	.area XSEG    (XDATA)
_MDMCTRL0H	=	0xdf02
_MDMCTRL0L	=	0xdf03
_MDMCTRL1H	=	0xdf04
_MDMCTRL1L	=	0xdf05
_RSSIH	=	0xdf06
_RSSIL	=	0xdf07
_SYNCWORDH	=	0xdf08
_SYNCWORDL	=	0xdf09
_TXCTRLH	=	0xdf0a
_TXCTRLL	=	0xdf0b
_RXCTRL0H	=	0xdf0c
_RXCTRL0L	=	0xdf0d
_RXCTRL1H	=	0xdf0e
_RXCTRL1L	=	0xdf0f
_FSCTRLH	=	0xdf10
_FSCTRLL	=	0xdf11
_CSPX	=	0xdf12
_CSPY	=	0xdf13
_CSPZ	=	0xdf14
_CSPCTRL	=	0xdf15
_CSPT	=	0xdf16
_RFPWR	=	0xdf17
_FSMTCH	=	0xdf20
_FSMTCL	=	0xdf21
_MANANDH	=	0xdf22
_MANANDL	=	0xdf23
_MANORH	=	0xdf24
_MANORL	=	0xdf25
_AGCCTRLH	=	0xdf26
_AGCCTRLL	=	0xdf27
_FSMSTATE	=	0xdf39
_ADCTSTH	=	0xdf3a
_ADCTSTL	=	0xdf3b
_DACTSTH	=	0xdf3c
_DACTSTL	=	0xdf3d
_IEEE_ADDR0	=	0xdf43
_IEEE_ADDR1	=	0xdf44
_IEEE_ADDR2	=	0xdf45
_IEEE_ADDR3	=	0xdf46
_IEEE_ADDR4	=	0xdf47
_IEEE_ADDR5	=	0xdf48
_IEEE_ADDR6	=	0xdf49
_IEEE_ADDR7	=	0xdf4a
_PANIDH	=	0xdf4b
_PANIDL	=	0xdf4c
_SHORTADDRH	=	0xdf4d
_SHORTADDRL	=	0xdf4e
_IOCFG0	=	0xdf4f
_IOCFG1	=	0xdf50
_IOCFG2	=	0xdf51
_IOCFG3	=	0xdf52
_RXFIFOCNT	=	0xdf53
_FSMTC1	=	0xdf54
_CHVER	=	0xdf60
_CHIPID	=	0xdf61
_RFSTATUS	=	0xdf62
_RFD_SHADOW	=	0xdfd9
_cipv6_pib::
	.ds 14
;--------------------------------------------------------
; absolute external ram data
;--------------------------------------------------------
	.area XABS    (ABS,XDATA)
;--------------------------------------------------------
; external initialized ram data
;--------------------------------------------------------
	.area XISEG   (XDATA)
	.area HOME    (CODE)
	.area GSINIT0 (CODE)
	.area GSINIT1 (CODE)
	.area GSINIT2 (CODE)
	.area GSINIT3 (CODE)
	.area GSINIT4 (CODE)
	.area GSINIT5 (CODE)
	.area GSINIT  (CODE)
	.area GSFINAL (CODE)
	.area CSEG    (CODE)
;--------------------------------------------------------
; global & static initialisations
;--------------------------------------------------------
	.area HOME    (CODE)
	.area GSINIT  (CODE)
	.area GSFINAL (CODE)
	.area GSINIT  (CODE)
;--------------------------------------------------------
; Home
;--------------------------------------------------------
	.area HOME    (CODE)
	.area HOME    (CODE)
;--------------------------------------------------------
; code
;--------------------------------------------------------
	.area CSEG    (CODE)
;------------------------------------------------------------
;Allocation info for local variables in function 'cipv6_init'
;------------------------------------------------------------
;buf                       Allocated to registers 
;------------------------------------------------------------
;	../../Common/modules/cIPv6.c:87: portCHAR cipv6_init( buffer_t *buf )
;	-----------------------------------------
;	 function cipv6_init
;	-----------------------------------------
_cipv6_init:
	ar2 = 0x02
	ar3 = 0x03
	ar4 = 0x04
	ar5 = 0x05
	ar6 = 0x06
	ar7 = 0x07
	ar0 = 0x00
	ar1 = 0x01
;	../../Common/modules/cIPv6.c:91: cipv6_pib.own_brodcast_sqn = 0;
	mov	dptr,#_cipv6_pib
	clr	a
	movx	@dptr,a
;	../../Common/modules/cIPv6.c:92: cipv6_pib.last_forwarded_bc_sqn = 0xff;
	mov	dptr,#(_cipv6_pib + 0x0001)
	mov	a,#0xFF
	movx	@dptr,a
;	../../Common/modules/cIPv6.c:93: cipv6_pib.use_short_address=0;
	mov	dptr,#(_cipv6_pib + 0x000c)
	clr	a
	movx	@dptr,a
;	../../Common/modules/cIPv6.c:94: cipv6_pib.short_address[0] = 0xfe;
	mov	dptr,#(_cipv6_pib + 0x000a)
	mov	a,#0xFE
	movx	@dptr,a
;	../../Common/modules/cIPv6.c:95: cipv6_pib.short_address[1] = 0xff;
	mov	dptr,#(_cipv6_pib + 0x000b)
	mov	a,#0xFF
	movx	@dptr,a
;	../../Common/modules/cIPv6.c:96: cipv6_pib.use_full_compress = 1;
	mov	dptr,#(_cipv6_pib + 0x000d)
	mov	a,#0x01
	movx	@dptr,a
;	../../Common/modules/cIPv6.c:97: routing_init();
	lcall	_routing_init
;	../../Common/modules/cIPv6.c:98: return pdTRUE;
	mov	dpl,#0x01
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'cipv6_compress_mode'
;------------------------------------------------------------
;mode                      Allocated to registers r2 
;------------------------------------------------------------
;	../../Common/modules/cIPv6.c:106: void cipv6_compress_mode( uint8_t mode )
;	-----------------------------------------
;	 function cipv6_compress_mode
;	-----------------------------------------
_cipv6_compress_mode:
	mov	r2,dpl
;	../../Common/modules/cIPv6.c:108: cipv6_pib.use_full_compress = mode;
	mov	dptr,#(_cipv6_pib + 0x000d)
	mov	a,r2
	movx	@dptr,a
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'cipv6_handle'
;------------------------------------------------------------
;buf                       Allocated to stack - offset 1
;i                         Allocated to stack - offset 4
;ptr                       Allocated to registers r5 r6 r7 
;sloc0                     Allocated to stack - offset 5
;------------------------------------------------------------
;	../../Common/modules/cIPv6.c:117: portCHAR cipv6_handle( buffer_t *buf )
;	-----------------------------------------
;	 function cipv6_handle
;	-----------------------------------------
_cipv6_handle:
	push	_bp
	mov	_bp,sp
	push	dpl
	push	dph
	push	b
	inc	sp
	inc	sp
	inc	sp
;	../../Common/modules/cIPv6.c:122: if(cipv6_pib.own_brodcast_sqn == 0)
	mov	dptr,#_cipv6_pib
	movx	a,@dptr
	jnz	00102$
;	../../Common/modules/cIPv6.c:124: cipv6_pib.own_brodcast_sqn = mac_long.address[7];
	mov	dptr,#(_mac_long + 0x0008)
	movx	a,@dptr
	mov	r5,a
	mov	dptr,#_cipv6_pib
	movx	@dptr,a
00102$:
;	../../Common/modules/cIPv6.c:130: if(buf->options.type == BUFFER_CONTROL && buf)		/* Control message received */
	mov	r0,_bp
	inc	r0
	mov	a,#0x26
	add	a,@r0
	mov	r5,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r6,a
	inc	r0
	mov	ar7,@r0
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	__gptrget
	mov	r5,a
	cjne	r5,#0x01,00174$
	sjmp	00175$
00174$:
	ljmp	00119$
00175$:
	mov	r0,_bp
	inc	r0
	mov	a,@r0
	inc	r0
	orl	a,@r0
	inc	r0
	orl	a,@r0
	jnz	00176$
	ljmp	00119$
00176$:
;	../../Common/modules/cIPv6.c:132: control_message_t *ptr = ( control_message_t*) buf->buf;
	mov	r0,_bp
	inc	r0
	mov	a,#0x2C
	add	a,@r0
	mov	r5,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r6,a
	inc	r0
	mov	ar7,@r0
;	../../Common/modules/cIPv6.c:133: if(ptr->message.ip_control.message_id==IP_ADDRESS__MODE_SETUP)
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	__gptrget
	jz	00177$
	ljmp	00115$
00177$:
;	../../Common/modules/cIPv6.c:138: if(cipv6_pib.use_short_address==1 && buf)
	push	ar5
	push	ar6
	push	ar7
	mov	dptr,#(_cipv6_pib + 0x000c)
	movx	a,@dptr
	mov	r5,a
	clr	a
	cjne	r5,#0x01,00178$
	inc	a
00178$:
	pop	ar7
	pop	ar6
	pop	ar5
	jz	00106$
	mov	r0,_bp
	inc	r0
	mov	a,@r0
	inc	r0
	orl	a,@r0
	inc	r0
	orl	a,@r0
	jz	00106$
;	../../Common/modules/cIPv6.c:140: if(ptr->message.ip_control.message.address_setup.use_short_address==0) cipv6_pib.use_short_address=0;
	mov	a,#0x01
	add	a,r5
	mov	r2,a
	clr	a
	addc	a,r6
	mov	r3,a
	mov	ar4,r7
	mov	a,#0x08
	add	a,r2
	mov	r2,a
	clr	a
	addc	a,r3
	mov	r3,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	jnz	00104$
	mov	dptr,#(_cipv6_pib + 0x000c)
	clr	a
	movx	@dptr,a
00104$:
;	../../Common/modules/cIPv6.c:141: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	push	ar5
	push	ar6
	push	ar7
	lcall	_stack_buffer_free
	pop	ar7
	pop	ar6
	pop	ar5
;	../../Common/modules/cIPv6.c:142: buf=0;
	mov	r0,_bp
	inc	r0
	clr	a
	mov	@r0,a
	inc	r0
	mov	@r0,a
	inc	r0
	mov	@r0,a
00106$:
;	../../Common/modules/cIPv6.c:144: if(cipv6_pib.use_short_address==0 && buf)
	mov	dptr,#(_cipv6_pib + 0x000c)
	movx	a,@dptr
	jz	00183$
	ljmp	00115$
00183$:
	mov	r0,_bp
	inc	r0
	mov	a,@r0
	inc	r0
	orl	a,@r0
	inc	r0
	orl	a,@r0
	jnz	00184$
	ljmp	00115$
00184$:
;	../../Common/modules/cIPv6.c:146: if(ptr->message.ip_control.message.address_setup.use_short_address)
	inc	r5
	cjne	r5,#0x00,00185$
	inc	r6
00185$:
	mov	a,#0x08
	add	a,r5
	mov	r2,a
	clr	a
	addc	a,r6
	mov	r3,a
	mov	ar4,r7
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	jz	00161$
;	../../Common/modules/cIPv6.c:148: cipv6_pib.use_short_address=1;
	mov	dptr,#(_cipv6_pib + 0x000c)
	mov	a,#0x01
	movx	@dptr,a
;	../../Common/modules/cIPv6.c:149: for(i=0; i<2;i++)
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	@r0,#0x00
00138$:
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	cjne	@r0,#0x02,00187$
00187$:
	jc	00188$
	ljmp	00110$
00188$:
;	../../Common/modules/cIPv6.c:151: cipv6_pib.short_address[i] = ptr->message.ip_control.message.address_setup.address[i];
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,_bp
	add	a,#0x05
	mov	r1,a
	mov	a,@r0
	add	a,#(_cipv6_pib + 0x000a)
	mov	@r1,a
	clr	a
	addc	a,#((_cipv6_pib + 0x000a) >> 8)
	inc	r1
	mov	@r1,a
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,@r0
	add	a,r5
	mov	r2,a
	clr	a
	addc	a,r6
	mov	r3,a
	mov	ar4,r7
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	mov	a,r2
	movx	@dptr,a
;	../../Common/modules/cIPv6.c:149: for(i=0; i<2;i++)
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	inc	@r0
;	../../Common/modules/cIPv6.c:156: for(i=0; i<8;i++)
	sjmp	00138$
00161$:
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	@r0,#0x00
00142$:
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	cjne	@r0,#0x08,00189$
00189$:
	jnc	00110$
;	../../Common/modules/cIPv6.c:158: cipv6_pib.long_address[i] = ptr->message.ip_control.message.address_setup.address[i] ;
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,_bp
	add	a,#0x05
	mov	r1,a
	mov	a,@r0
	add	a,#(_cipv6_pib + 0x0002)
	mov	@r1,a
	clr	a
	addc	a,#((_cipv6_pib + 0x0002) >> 8)
	inc	r1
	mov	@r1,a
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,@r0
	add	a,r5
	mov	r2,a
	clr	a
	addc	a,r6
	mov	r3,a
	mov	ar4,r7
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	mov	a,r2
	movx	@dptr,a
;	../../Common/modules/cIPv6.c:156: for(i=0; i<8;i++)
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	inc	@r0
	sjmp	00142$
00110$:
;	../../Common/modules/cIPv6.c:161: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_free
;	../../Common/modules/cIPv6.c:162: buf=0;
	mov	r0,_bp
	inc	r0
	clr	a
	mov	@r0,a
	inc	r0
	mov	@r0,a
	inc	r0
	mov	@r0,a
00115$:
;	../../Common/modules/cIPv6.c:165: if(buf)
	mov	r0,_bp
	inc	r0
	mov	a,@r0
	inc	r0
	orl	a,@r0
	inc	r0
	orl	a,@r0
	jz	00117$
;	../../Common/modules/cIPv6.c:167: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_free
;	../../Common/modules/cIPv6.c:168: buf=0;
00117$:
;	../../Common/modules/cIPv6.c:170: return pdTRUE;
	mov	dpl,#0x01
	ljmp	00146$
00119$:
;	../../Common/modules/cIPv6.c:173: switch(buf->dir)
	mov	r0,_bp
	inc	r0
	mov	a,#0x1F
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	jz	00125$
	cjne	r2,#0x01,00193$
	sjmp	00194$
00193$:
	ljmp	00137$
00194$:
;	../../Common/modules/cIPv6.c:176: if(cipv6_pib.use_full_compress)
	mov	dptr,#(_cipv6_pib + 0x000d)
	movx	a,@dptr
	jz	00123$
;	../../Common/modules/cIPv6.c:178: build_lowpan_header(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_build_lowpan_header
	ljmp	00137$
00123$:
;	../../Common/modules/cIPv6.c:182: build_ipv6_header(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_build_ipv6_header
;	../../Common/modules/cIPv6.c:184: break;
	ljmp	00137$
;	../../Common/modules/cIPv6.c:186: case BUFFER_UP:			/* From Lower layer(usually RF802.15.4) */
00125$:
;	../../Common/modules/cIPv6.c:189: if(buf->options.handle_type == HANDLE_BROKEN_LINK)
	mov	r0,_bp
	inc	r0
	mov	a,#0x26
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,#0x03
	add	a,r2
	mov	r2,a
	clr	a
	addc	a,r3
	mov	r3,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	cjne	r2,#0x04,00127$
;	../../Common/modules/cIPv6.c:195: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_free
;	../../Common/modules/cIPv6.c:196: buf=0;
	mov	r0,_bp
	inc	r0
	clr	a
	mov	@r0,a
	inc	r0
	mov	@r0,a
	inc	r0
	mov	@r0,a
00127$:
;	../../Common/modules/cIPv6.c:200: if(buf)
	mov	r0,_bp
	inc	r0
	mov	a,@r0
	inc	r0
	orl	a,@r0
	inc	r0
	orl	a,@r0
	jnz	00198$
	ljmp	00137$
00198$:
;	../../Common/modules/cIPv6.c:202: if(buf->buf[buf->buf_ptr] == IPV6)
	mov	r0,_bp
	inc	r0
	mov	a,#0x2C
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	r0,_bp
	inc	r0
	mov	a,#0x20
	add	a,@r0
	mov	r5,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r6,a
	inc	r0
	mov	ar7,@r0
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	__gptrget
	mov	r5,a
	inc	dptr
	lcall	__gptrget
	mov	r6,a
	mov	a,r5
	add	a,r2
	mov	r2,a
	mov	a,r6
	addc	a,r3
	mov	r3,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	cjne	r2,#0x82,00133$
;	../../Common/modules/cIPv6.c:204: parse_ipv_header(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_parse_ipv_header
;	../../Common/modules/cIPv6.c:205: buf=0;
	sjmp	00137$
00133$:
;	../../Common/modules/cIPv6.c:209: switch (buf->buf[buf->buf_ptr] & LOWPAN_TYPE_BM )
	mov	r0,_bp
	inc	r0
	mov	a,#0x2C
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,r5
	add	a,r2
	mov	r5,a
	mov	a,r6
	addc	a,r3
	mov	r6,a
	mov	ar7,r4
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	__gptrget
	mov	r5,a
	mov	a,#0x03
	anl	a,r5
	mov	r2,a
	cjne	r2,#0x01,00201$
	sjmp	00129$
00201$:
	cjne	r2,#0x02,00130$
;	../../Common/modules/cIPv6.c:215: parse_hc1_message(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_parse_hc1_message
;	../../Common/modules/cIPv6.c:216: break;	
;	../../Common/modules/cIPv6.c:219: case MESH_ROUTING_TYPE: /* Mesh Routing */
	sjmp	00137$
00129$:
;	../../Common/modules/cIPv6.c:221: parse_mesh_packet(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_parse_mesh_packet
;	../../Common/modules/cIPv6.c:222: break;	/* END_OF_MESH_ROUTING_TYPE */
;	../../Common/modules/cIPv6.c:224: default:
	sjmp	00137$
00130$:
;	../../Common/modules/cIPv6.c:225: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_free
;	../../Common/modules/cIPv6.c:232: }
00137$:
;	../../Common/modules/cIPv6.c:233: return pdTRUE;
	mov	dpl,#0x01
00146$:
	mov	sp,_bp
	pop	_bp
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'cipv6_check'
;------------------------------------------------------------
;buf                       Allocated to stack - offset 1
;temp                      Allocated to registers r2 
;------------------------------------------------------------
;	../../Common/modules/cIPv6.c:244: portCHAR cipv6_check( buffer_t *buf )
;	-----------------------------------------
;	 function cipv6_check
;	-----------------------------------------
_cipv6_check:
	push	_bp
	mov	_bp,sp
	push	dpl
	push	dph
	push	b
;	../../Common/modules/cIPv6.c:248: if(buf->buf[buf->buf_ptr] == IPV6)
	mov	r0,_bp
	inc	r0
	mov	a,#0x2C
	add	a,@r0
	mov	r5,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r6,a
	inc	r0
	mov	ar7,@r0
	mov	r0,_bp
	inc	r0
	mov	a,#0x20
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	inc	dptr
	lcall	__gptrget
	mov	r3,a
	mov	a,r2
	add	a,r5
	mov	r5,a
	mov	a,r3
	addc	a,r6
	mov	r6,a
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	__gptrget
	mov	r5,a
	cjne	r5,#0x82,00108$
;	../../Common/modules/cIPv6.c:251: return pdTRUE; 
	mov	dpl,#0x01
	sjmp	00110$
00108$:
;	../../Common/modules/cIPv6.c:255: temp = (buf->buf[buf->buf_ptr] & LOWPAN_TYPE_BM);
	mov	r0,_bp
	inc	r0
	mov	a,#0x2C
	add	a,@r0
	mov	r4,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r5,a
	inc	r0
	mov	ar6,@r0
	mov	a,r2
	add	a,r4
	mov	r2,a
	mov	a,r3
	addc	a,r5
	mov	r3,a
	mov	ar7,r6
	mov	dpl,r2
	mov	dph,r3
	mov	b,r7
	lcall	__gptrget
	mov	r2,a
	anl	ar2,#0x03
;	../../Common/modules/cIPv6.c:256: if(temp == DISPATCH_TYPE)
	cjne	r2,#0x02,00105$
;	../../Common/modules/cIPv6.c:258: return pdTRUE; 
	mov	dpl,#0x01
	sjmp	00110$
00105$:
;	../../Common/modules/cIPv6.c:266: else if(temp == MESH_ROUTING_TYPE)
	cjne	r2,#0x01,00102$
;	../../Common/modules/cIPv6.c:268: return pdTRUE; 
	mov	dpl,#0x01
	sjmp	00110$
00102$:
;	../../Common/modules/cIPv6.c:272: return pdFALSE;
	mov	dpl,#0x00
00110$:
	mov	sp,_bp
	pop	_bp
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'parse_hc1_message'
;------------------------------------------------------------
;buf                       Allocated to stack - offset 1
;ind                       Allocated to stack - offset 4
;lowpan_dispatch           Allocated to registers r2 
;hc1                       Allocated to registers r2 
;hoplimit                  Allocated to registers r2 
;hc2_field_check           Allocated to stack - offset 5
;sloc0                     Allocated to stack - offset 6
;------------------------------------------------------------
;	../../Common/modules/cIPv6.c:282: void parse_hc1_message(buffer_t *buf)
;	-----------------------------------------
;	 function parse_hc1_message
;	-----------------------------------------
_parse_hc1_message:
	push	_bp
	mov	_bp,sp
	push	dpl
	push	dph
	push	b
	mov	a,sp
	add	a,#0x08
	mov	sp,a
;	../../Common/modules/cIPv6.c:284: uint8_t ind=0, lowpan_dispatch, hc1,hoplimit=0, hc2_field_check=0;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	@r0,#0x00
;	../../Common/modules/cIPv6.c:285: ind = buf->buf_ptr;
	mov	r0,_bp
	inc	r0
	mov	a,#0x20
	add	a,@r0
	mov	r6,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r7,a
	inc	r0
	mov	ar5,@r0
	mov	dpl,r6
	mov	dph,r7
	mov	b,r5
	lcall	__gptrget
	mov	r2,a
	inc	dptr
	lcall	__gptrget
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	@r0,ar2
;	../../Common/modules/cIPv6.c:287: lowpan_dispatch = buf->buf[ind++];
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	a,#0x2C
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	ar2,@r0
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	inc	@r0
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	a,r2
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
;	../../Common/modules/cIPv6.c:289: if( lowpan_dispatch == LOWPAN_HC1 )
	cjne	r2,#0x42,00133$
	sjmp	00134$
00133$:
	ljmp	00120$
00134$:
;	../../Common/modules/cIPv6.c:296: hc1 = buf->buf[ind++];
	push	ar6
	push	ar7
	push	ar5
	mov	r0,_bp
	inc	r0
	mov	a,#0x2C
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	ar5,@r0
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	inc	@r0
	mov	a,r5
	add	a,r2
	mov	r2,a
	clr	a
	addc	a,r3
	mov	r3,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
;	../../Common/modules/cIPv6.c:298: if((hc1==HC1_NEXT_HEADER_COMPRESSED_UDP || hc1 == HC1_NEXT_HEADER_UNCOMPRES_UDP)  || hc1==IP_HEADER_FOR_ICMP)
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	clr	a
	cjne	r2,#0xBF,00135$
	inc	a
00135$:
	mov	@r0,a
	pop	ar5
	pop	ar7
	pop	ar6
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	a,@r0
	jnz	00115$
	cjne	r2,#0x3F,00138$
	sjmp	00115$
00138$:
	cjne	r2,#0x5F,00139$
	sjmp	00140$
00139$:
	ljmp	00120$
00140$:
00115$:
;	../../Common/modules/cIPv6.c:300: if((hc1==HC1_NEXT_HEADER_COMPRESSED_UDP || hc1 == HC1_NEXT_HEADER_UNCOMPRES_UDP))
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	a,@r0
	jnz	00107$
	cjne	r2,#0x3F,00142$
	sjmp	00143$
00142$:
	ljmp	00108$
00143$:
00107$:
;	../../Common/modules/cIPv6.c:302: buf->to = MODULE_CUDP;
	mov	r0,_bp
	inc	r0
	mov	a,#0x1E
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,#0x02
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:303: if(hc1 == HC1_NEXT_HEADER_COMPRESSED_UDP) /* Read udp encode field */
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	a,@r0
	jnz	00144$
	ljmp	00105$
00144$:
;	../../Common/modules/cIPv6.c:305: buf->options.lowpan_compressed = buf->buf[ind++];
	push	ar6
	push	ar7
	push	ar5
	mov	r0,_bp
	inc	r0
	mov	a,#0x26
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,#0x05
	add	a,r2
	mov	r2,a
	clr	a
	addc	a,r3
	mov	r3,a
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	a,#0x2C
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	ar5,@r0
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	inc	@r0
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	a,r5
	add	a,@r0
	mov	r5,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r6,a
	inc	r0
	mov	ar7,@r0
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	__gptrget
	mov	r5,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:306: if(buf->options.lowpan_compressed==0x07 || buf->options.lowpan_compressed==0x04)
	clr	a
	cjne	r5,#0x07,00145$
	inc	a
00145$:
	pop	ar5
	pop	ar7
	pop	ar6
	jnz	00101$
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	cjne	r2,#0x04,00109$
00101$:
;	../../Common/modules/cIPv6.c:307: hc2_field_check=1;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	@r0,#0x01
	sjmp	00109$
00105$:
;	../../Common/modules/cIPv6.c:310: hc2_field_check=1;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	@r0,#0x01
	sjmp	00109$
00108$:
;	../../Common/modules/cIPv6.c:314: buf->to = MODULE_ICMP;
	mov	r0,_bp
	inc	r0
	mov	a,#0x1E
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,#0x04
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:315: buf->options.hop_count = 1;
	mov	r0,_bp
	inc	r0
	mov	a,#0x26
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,#0x04
	add	a,r2
	mov	r2,a
	clr	a
	addc	a,r3
	mov	r3,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,#0x01
	lcall	__gptrput
00109$:
;	../../Common/modules/cIPv6.c:318: hoplimit= buf->buf[ind++];
	push	ar6
	push	ar7
	push	ar5
	mov	r0,_bp
	inc	r0
	mov	a,#0x2C
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	ar5,@r0
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	inc	@r0
	mov	a,r5
	add	a,r2
	mov	r2,a
	clr	a
	addc	a,r3
	mov	r3,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
;	../../Common/modules/cIPv6.c:319: hoplimit--;
	dec	r2
;	../../Common/modules/cIPv6.c:320: if((hoplimit > 0 && hc2_field_check) || buf->to == MODULE_ICMP)
	pop	ar5
	pop	ar7
	pop	ar6
	mov	a,r2
	jz	00114$
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	a,@r0
	jnz	00111$
00114$:
	mov	r0,_bp
	inc	r0
	mov	a,#0x1E
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	cjne	r2,#0x04,00120$
00111$:
;	../../Common/modules/cIPv6.c:322: buf->buf_ptr = ind; /*cut header*/
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	ar2,@r0
	mov	r3,#0x00
	mov	dpl,r6
	mov	dph,r7
	mov	b,r5
	mov	a,r2
	lcall	__gptrput
	inc	dptr
	mov	a,r3
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:324: buf->from = MODULE_CIPV6;
	mov	r0,_bp
	inc	r0
	mov	a,#0x1D
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,#0x01
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:325: stack_buffer_push(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_push
;	../../Common/modules/cIPv6.c:326: buf=0;
	mov	r0,_bp
	inc	r0
	clr	a
	mov	@r0,a
	inc	r0
	mov	@r0,a
	inc	r0
	mov	@r0,a
00120$:
;	../../Common/modules/cIPv6.c:331: if(buf)
	mov	r0,_bp
	inc	r0
	mov	a,@r0
	inc	r0
	orl	a,@r0
	inc	r0
	orl	a,@r0
	jz	00123$
;	../../Common/modules/cIPv6.c:336: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_free
;	../../Common/modules/cIPv6.c:337: buf=0;
00123$:
	mov	sp,_bp
	pop	_bp
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'parse_mesh_packet'
;------------------------------------------------------------
;buf                       Allocated to stack - offset 1
;tmp_8                     Allocated to registers r3 
;mesh_header               Allocated to registers r2 
;hops_left                 Allocated to registers 
;i                         Allocated to stack - offset 4
;bc_seq                    Allocated to stack - offset 27
;dest_length               Allocated to stack - offset 5
;ind                       Allocated to stack - offset 6
;lowpan_dispatch           Allocated to registers r3 
;hc1                       Allocated to registers r2 
;hoplimit                  Allocated to stack - offset 7
;tmp                       Allocated to registers r2 
;hops_to_ori               Allocated to stack - offset 8
;o_addrtype                Allocated to stack - offset 9
;ori_address               Allocated to stack - offset 10
;address_mode              Allocated to registers r2 
;sloc0                     Allocated to stack - offset 20
;sloc1                     Allocated to stack - offset 23
;sloc2                     Allocated to stack - offset 26
;sloc3                     Allocated to stack - offset 27
;sloc4                     Allocated to stack - offset 30
;sloc5                     Allocated to stack - offset 31
;------------------------------------------------------------
;	../../Common/modules/cIPv6.c:341: void parse_mesh_packet(buffer_t *buf)
;	-----------------------------------------
;	 function parse_mesh_packet
;	-----------------------------------------
_parse_mesh_packet:
	push	_bp
	mov	_bp,sp
	push	dpl
	push	dph
	push	b
	mov	a,sp
	add	a,#0x21
	mov	sp,a
;	../../Common/modules/cIPv6.c:358: ind = buf->buf_ptr;
	mov	r0,_bp
	inc	r0
	mov	a,#0x20
	add	a,@r0
	mov	r5,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r6,a
	inc	r0
	mov	ar7,@r0
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	__gptrget
	mov	r2,a
	inc	dptr
	lcall	__gptrget
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	@r0,ar2
;	../../Common/modules/cIPv6.c:360: mesh_header = buf->buf[ind++];
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x14
	mov	r1,a
	mov	a,#0x2C
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	ar2,@r0
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	inc	@r0
	mov	a,_bp
	add	a,#0x14
	mov	r0,a
	mov	a,r2
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
;	../../Common/modules/cIPv6.c:366: tmp=(mesh_header & MESH_ADDRESSTYPE_BM);
	anl	ar2,#0x0C
;	../../Common/modules/cIPv6.c:367: tmp_8 = (tmp & O_ADDRESSTYPE_BM);
	mov	a,#0x04
	anl	a,r2
	mov	r3,a
;	../../Common/modules/cIPv6.c:369: if(tmp_8 == O_ADDRESSTYPE_16)
	cjne	r3,#0x04,00102$
;	../../Common/modules/cIPv6.c:371: o_addrtype=ADDR_802_15_4_PAN_SHORT;
	mov	a,_bp
	add	a,#0x09
	mov	r0,a
	mov	@r0,#0x03
;	../../Common/modules/cIPv6.c:372: dest_length=2;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	@r0,#0x02
	sjmp	00165$
00102$:
;	../../Common/modules/cIPv6.c:376: o_addrtype=ADDR_802_15_4_PAN_LONG;
	mov	a,_bp
	add	a,#0x09
	mov	r0,a
	mov	@r0,#0x04
;	../../Common/modules/cIPv6.c:377: dest_length=8;	
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	@r0,#0x08
;	../../Common/modules/cIPv6.c:380: for(i=0; i < dest_length; i++)
00165$:
	mov	a,_bp
	add	a,#0x14
	mov	r0,a
	mov	a,_bp
	add	a,#0x0a
	mov	@r0,a
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x17
	mov	r1,a
	mov	a,#0x2C
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	ar3,@r0
	mov	r4,#0x00
00153$:
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	clr	c
	mov	a,r4
	subb	a,@r0
	jnc	00189$
;	../../Common/modules/cIPv6.c:382: ori_address[i] = buf->buf[ind++];
	push	ar5
	push	ar6
	push	ar7
	mov	a,_bp
	add	a,#0x14
	mov	r1,a
	mov	a,r4
	add	a,@r1
	mov	r0,a
	mov	ar5,r3
	inc	r3
	mov	a,_bp
	add	a,#0x17
	mov	r1,a
	mov	a,r5
	add	a,@r1
	mov	r5,a
	clr	a
	inc	r1
	addc	a,@r1
	mov	r6,a
	inc	r1
	mov	ar7,@r1
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	__gptrget
	mov	@r0,a
;	../../Common/modules/cIPv6.c:380: for(i=0; i < dest_length; i++)
	inc	r4
	pop	ar7
	pop	ar6
	pop	ar5
	sjmp	00153$
00189$:
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	@r0,ar3
;	../../Common/modules/cIPv6.c:384: tmp_8 = (tmp & D_ADDRESSTYPE_BM);
	mov	a,#0x08
	anl	a,r2
	mov	r3,a
;	../../Common/modules/cIPv6.c:386: if(tmp_8 == D_ADDRESSTYPE_16)
	cjne	r3,#0x08,00105$
;	../../Common/modules/cIPv6.c:388: buf->dst_sa.addr_type =  ADDR_802_15_4_PAN_SHORT;
	push	ar5
	push	ar6
	push	ar7
	mov	r0,_bp
	inc	r0
	mov	a,#0x03
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar5,@r0
	mov	dpl,r3
	mov	dph,r4
	mov	b,r5
	mov	a,#0x03
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:389: dest_length=2;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	@r0,#0x02
	pop	ar7
	pop	ar6
	pop	ar5
	sjmp	00168$
00105$:
;	../../Common/modules/cIPv6.c:393: buf->dst_sa.addr_type=ADDR_802_15_4_PAN_LONG;
	push	ar5
	push	ar6
	push	ar7
	mov	r0,_bp
	inc	r0
	mov	a,#0x03
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar5,@r0
	mov	dpl,r3
	mov	dph,r4
	mov	b,r5
	mov	a,#0x04
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:394: dest_length=8;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	@r0,#0x08
;	../../Common/modules/cIPv6.c:583: buf=0;
	pop	ar7
	pop	ar6
	pop	ar5
;	../../Common/modules/cIPv6.c:397: for(i=0; i < dest_length; i++)
00168$:
	push	ar5
	push	ar6
	push	ar7
	mov	r0,_bp
	inc	r0
	mov	a,#0x03
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar5,@r0
	mov	a,_bp
	add	a,#0x17
	mov	r0,a
	mov	a,#0x01
	add	a,r3
	mov	@r0,a
	clr	a
	addc	a,r4
	inc	r0
	mov	@r0,a
	inc	r0
	mov	@r0,ar5
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x1b
	mov	r1,a
	mov	a,#0x2C
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	a,_bp
	add	a,#0x1a
	mov	r1,a
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	@r0,#0x00
;	../../Common/modules/cIPv6.c:583: buf=0;
	pop	ar7
	pop	ar6
	pop	ar5
;	../../Common/modules/cIPv6.c:397: for(i=0; i < dest_length; i++)
00157$:
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,_bp
	add	a,#0x05
	mov	r1,a
	clr	c
	mov	a,@r0
	subb	a,@r1
	jnc	00190$
;	../../Common/modules/cIPv6.c:399: buf->dst_sa.address[i] = buf->buf[ind++];
	push	ar5
	push	ar6
	push	ar7
	mov	a,_bp
	add	a,#0x17
	mov	r0,a
	mov	a,_bp
	add	a,#0x04
	mov	r1,a
	mov	a,@r1
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar5,@r0
	mov	a,_bp
	add	a,#0x1a
	mov	r0,a
	mov	ar6,@r0
	mov	a,_bp
	add	a,#0x1a
	mov	r0,a
	inc	@r0
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	mov	a,r6
	add	a,@r0
	mov	r6,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r7,a
	inc	r0
	mov	ar2,@r0
	mov	dpl,r6
	mov	dph,r7
	mov	b,r2
	lcall	__gptrget
	mov	dpl,r3
	mov	dph,r4
	mov	b,r5
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:397: for(i=0; i < dest_length; i++)
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	inc	@r0
	pop	ar7
	pop	ar6
	pop	ar5
	sjmp	00157$
00190$:
	mov	a,_bp
	add	a,#0x1a
	mov	r0,a
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	a,@r0
	mov	@r1,a
;	../../Common/modules/cIPv6.c:402: address_mode = OWN;
	push	ar5
	push	ar6
	push	ar7
	mov	r2,#0xC1
;	../../Common/modules/cIPv6.c:404: if(buf->dst_sa.addr_type==ADDR_802_15_4_PAN_LONG)
	mov	r0,_bp
	inc	r0
	mov	a,#0x03
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar5,@r0
	mov	dpl,r3
	mov	dph,r4
	mov	b,r5
	lcall	__gptrget
	mov	r3,a
	clr	a
	cjne	r3,#0x04,00197$
	inc	a
00197$:
	pop	ar7
	pop	ar6
	pop	ar5
	jnz	00199$
	ljmp	00118$
00199$:
;	../../Common/modules/cIPv6.c:406: if (memcmp(buf->dst_sa.address, cipv6_pib.long_address, 8) != 0)
	push	ar2
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x1b
	mov	r1,a
	mov	a,#0x03
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	mov	a,#0x01
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar2,@r0
	push	ar5
	push	ar6
	push	ar7
	mov	a,#0x08
	push	acc
	clr	a
	push	acc
	mov	a,#(_cipv6_pib + 0x0002)
	push	acc
	mov	a,#((_cipv6_pib + 0x0002) >> 8)
	push	acc
	clr	a
	push	acc
	mov	dpl,r3
	mov	dph,r4
	mov	b,r2
	lcall	_memcmp
	mov	r2,dpl
	mov	r3,dph
	mov	a,sp
	add	a,#0xfb
	mov	sp,a
	pop	ar7
	pop	ar6
	pop	ar5
	clr	a
	cjne	r2,#0x00,00200$
	cjne	r3,#0x00,00200$
	inc	a
00200$:
	pop	ar2
	jz	00202$
	ljmp	00119$
00202$:
;	../../Common/modules/cIPv6.c:408: if(stack_check_broadcast(buf->dst_sa.address, ADDR_802_15_4_PAN_LONG) != pdTRUE)
	push	ar5
	push	ar6
	push	ar7
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	mov	a,#0x01
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar5,@r0
	push	ar5
	push	ar6
	push	ar7
	mov	a,#0x04
	push	acc
	mov	dpl,r3
	mov	dph,r4
	mov	b,r5
	lcall	_stack_check_broadcast
	mov	r3,dpl
	dec	sp
	pop	ar7
	pop	ar6
	pop	ar5
	clr	a
	cjne	r3,#0x01,00203$
	inc	a
00203$:
	pop	ar7
	pop	ar6
	pop	ar5
	jnz	00108$
;	../../Common/modules/cIPv6.c:411: address_mode = NOT_OWN;
	mov	r2,#0xC2
	ljmp	00119$
00108$:
;	../../Common/modules/cIPv6.c:416: address_mode = BCAST;
	mov	r2,#0xC0
	ljmp	00119$
00118$:
;	../../Common/modules/cIPv6.c:422: if (memcmp(buf->dst_sa.address, cipv6_pib.short_address, 2) != 0)
	push	ar2
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x1b
	mov	r1,a
	mov	a,#0x03
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	mov	a,#0x01
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar2,@r0
	push	ar5
	push	ar6
	push	ar7
	mov	a,#0x02
	push	acc
	clr	a
	push	acc
	mov	a,#(_cipv6_pib + 0x000a)
	push	acc
	mov	a,#((_cipv6_pib + 0x000a) >> 8)
	push	acc
	clr	a
	push	acc
	mov	dpl,r3
	mov	dph,r4
	mov	b,r2
	lcall	_memcmp
	mov	r2,dpl
	mov	r3,dph
	mov	a,sp
	add	a,#0xfb
	mov	sp,a
	pop	ar7
	pop	ar6
	pop	ar5
	clr	a
	cjne	r2,#0x00,00206$
	cjne	r3,#0x00,00206$
	inc	a
00206$:
	pop	ar2
	jnz	00119$
;	../../Common/modules/cIPv6.c:424: if(stack_check_broadcast(buf->dst_sa.address, ADDR_SHORT) != pdTRUE)
	push	ar5
	push	ar6
	push	ar7
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	mov	a,#0x01
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar5,@r0
	push	ar5
	push	ar6
	push	ar7
	mov	a,#0x05
	push	acc
	mov	dpl,r3
	mov	dph,r4
	mov	b,r5
	lcall	_stack_check_broadcast
	mov	r3,dpl
	dec	sp
	pop	ar7
	pop	ar6
	pop	ar5
	clr	a
	cjne	r3,#0x01,00209$
	inc	a
00209$:
	pop	ar7
	pop	ar6
	pop	ar5
	jnz	00113$
;	../../Common/modules/cIPv6.c:427: address_mode = NOT_OWN;
	mov	r2,#0xC2
	sjmp	00119$
00113$:
;	../../Common/modules/cIPv6.c:432: address_mode = BCAST;
	mov	r2,#0xC0
00119$:
;	../../Common/modules/cIPv6.c:436: switch (address_mode)
	mov	a,_bp
	add	a,#0x1e
	mov	r0,a
	clr	a
	cjne	r2,#0xC0,00212$
	inc	a
00212$:
	mov	@r0,a
	mov	a,_bp
	add	a,#0x1e
	mov	r0,a
	mov	a,@r0
	jnz	00121$
	cjne	r2,#0xC1,00215$
	sjmp	00216$
00215$:
	ljmp	00150$
00216$:
;	../../Common/modules/cIPv6.c:439: case BCAST:
00121$:
;	../../Common/modules/cIPv6.c:441: lowpan_dispatch = buf->buf[ind++];
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x1b
	mov	r1,a
	mov	a,#0x2C
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	ar2,@r0
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	inc	@r0
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	mov	a,r2
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	mov	ar3,r2
;	../../Common/modules/cIPv6.c:442: bc_seq=0;
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	mov	@r0,#0x00
;	../../Common/modules/cIPv6.c:443: if(lowpan_dispatch == LOWPAN_BC0)
	clr	a
	cjne	r3,#0x09,00217$
	inc	a
00217$:
	jz	00123$
;	../../Common/modules/cIPv6.c:445: bc_seq = buf->buf[ind++];
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x17
	mov	r1,a
	mov	a,#0x2C
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	ar2,@r0
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	inc	@r0
	mov	a,_bp
	add	a,#0x17
	mov	r0,a
	mov	a,r2
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	mov	@r0,ar2
;	../../Common/modules/cIPv6.c:447: lowpan_dispatch = buf->buf[ind++];
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	ar2,@r0
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	inc	@r0
	mov	a,_bp
	add	a,#0x17
	mov	r0,a
	mov	a,r2
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	mov	ar3,r2
;	../../Common/modules/cIPv6.c:583: buf=0;
;	../../Common/modules/cIPv6.c:447: lowpan_dispatch = buf->buf[ind++];
00123$:
;	../../Common/modules/cIPv6.c:449: if(lowpan_dispatch == LOWPAN_HC1)
	cjne	r3,#0x42,00220$
	sjmp	00221$
00220$:
	ljmp	00150$
00221$:
;	../../Common/modules/cIPv6.c:452: hc1= buf->buf[ind++];
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x17
	mov	r1,a
	mov	a,#0x2C
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	ar2,@r0
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	inc	@r0
	mov	a,_bp
	add	a,#0x17
	mov	r0,a
	mov	a,r2
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
;	../../Common/modules/cIPv6.c:453: if((hc1 == HC1_NEXT_HEADER_COMPRESSED_UDP || hc1 == HC1_NEXT_HEADER_UNCOMPRES_UDP) || hc1 == IP_HEADER_FOR_ICMP)
	mov	a,_bp
	add	a,#0x1a
	mov	r0,a
	clr	a
	cjne	r2,#0xBF,00222$
	inc	a
00222$:
	mov	@r0,a
	mov	a,_bp
	add	a,#0x1a
	mov	r0,a
	mov	a,@r0
	jnz	00143$
	cjne	r2,#0x3F,00225$
	sjmp	00143$
00225$:
	cjne	r2,#0x5F,00226$
	sjmp	00227$
00226$:
	ljmp	00150$
00227$:
00143$:
;	../../Common/modules/cIPv6.c:455: if(hc1 == IP_HEADER_FOR_ICMP)
	clr	a
	cjne	r2,#0x5F,00228$
	inc	a
00228$:
	mov	r2,a
	jz	00127$
;	../../Common/modules/cIPv6.c:457: buf->to = MODULE_ICMP;
	push	ar2
	mov	r0,_bp
	inc	r0
	mov	a,#0x1E
	add	a,@r0
	mov	r4,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r2,a
	inc	r0
	mov	ar3,@r0
	mov	dpl,r4
	mov	dph,r2
	mov	b,r3
	mov	a,#0x04
	lcall	__gptrput
	pop	ar2
	ljmp	00128$
00127$:
;	../../Common/modules/cIPv6.c:461: buf->to = MODULE_CUDP;
	push	ar2
	mov	r0,_bp
	inc	r0
	mov	a,#0x1E
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar2,@r0
	mov	dpl,r3
	mov	dph,r4
	mov	b,r2
	mov	a,#0x02
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:462: if(hc1 == HC1_NEXT_HEADER_COMPRESSED_UDP) /* Read udp encode field */
	pop	ar2
	mov	a,_bp
	add	a,#0x1a
	mov	r0,a
	mov	a,@r0
	jz	00128$
;	../../Common/modules/cIPv6.c:464: buf->options.lowpan_compressed = buf->buf[ind++];
	push	ar2
	mov	r0,_bp
	inc	r0
	mov	a,#0x26
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar2,@r0
	mov	a,_bp
	add	a,#0x17
	mov	r0,a
	mov	a,#0x05
	add	a,r3
	mov	@r0,a
	clr	a
	addc	a,r4
	inc	r0
	mov	@r0,a
	inc	r0
	mov	@r0,ar2
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x1f
	mov	r1,a
	mov	a,#0x2C
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	ar2,@r0
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	inc	@r0
	mov	a,_bp
	add	a,#0x1f
	mov	r0,a
	mov	a,r2
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	mov	a,_bp
	add	a,#0x17
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,r2
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:583: buf=0;
	pop	ar2
;	../../Common/modules/cIPv6.c:464: buf->options.lowpan_compressed = buf->buf[ind++];
00128$:
;	../../Common/modules/cIPv6.c:467: hoplimit= buf->buf[ind];
	push	ar5
	push	ar6
	push	ar7
	mov	r0,_bp
	inc	r0
	mov	a,#0x2C
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar5,@r0
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	a,@r0
	add	a,r3
	mov	r3,a
	clr	a
	addc	a,r4
	mov	r4,a
	mov	dpl,r3
	mov	dph,r4
	mov	b,r5
	lcall	__gptrget
	mov	r6,a
	mov	a,_bp
	add	a,#0x07
	mov	r0,a
	mov	@r0,ar6
;	../../Common/modules/cIPv6.c:468: hoplimit--;
	mov	a,_bp
	add	a,#0x07
	mov	r0,a
	dec	@r0
;	../../Common/modules/cIPv6.c:469: buf->buf[ind] = hoplimit;
	mov	dpl,r3
	mov	dph,r4
	mov	b,r5
	mov	a,_bp
	add	a,#0x07
	mov	r0,a
	mov	a,@r0
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:470: ind++;
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	inc	@r0
;	../../Common/modules/cIPv6.c:471: hops_to_ori = (GENERAL_HOPLIMIT - hoplimit);
	mov	a,_bp
	add	a,#0x07
	mov	r0,a
	mov	a,_bp
	add	a,#0x08
	mov	r1,a
	mov	a,#0x16
	clr	c
	subb	a,@r0
	mov	@r1,a
;	../../Common/modules/cIPv6.c:472: if(hc1 == IP_HEADER_FOR_ICMP) 
	pop	ar7
	pop	ar6
	pop	ar5
	mov	a,r2
	jz	00130$
;	../../Common/modules/cIPv6.c:473: buf->options.hop_count = hops_to_ori;
	mov	r0,_bp
	inc	r0
	mov	a,#0x26
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,#0x04
	add	a,r2
	mov	r2,a
	clr	a
	addc	a,r3
	mov	r3,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,_bp
	add	a,#0x08
	mov	r0,a
	mov	a,@r0
	lcall	__gptrput
00130$:
;	../../Common/modules/cIPv6.c:495: if(o_addrtype == ADDR_802_15_4_PAN_LONG)
	mov	a,_bp
	add	a,#0x09
	mov	r0,a
	cjne	@r0,#0x04,00132$
;	../../Common/modules/cIPv6.c:496: memcpy(buf->src_sa.address,ori_address, 8);
	push	ar5
	push	ar6
	push	ar7
	mov	a,_bp
	add	a,#0x14
	mov	r0,a
	mov	ar2,@r0
	mov	r3,#0x00
	mov	r4,#0x40
	mov	r0,_bp
	inc	r0
	mov	a,#0x10
	add	a,@r0
	mov	r5,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r6,a
	inc	r0
	mov	ar7,@r0
	inc	r5
	cjne	r5,#0x00,00235$
	inc	r6
00235$:
	push	ar5
	push	ar6
	push	ar7
	mov	a,#0x08
	push	acc
	clr	a
	push	acc
	push	ar2
	push	ar3
	push	ar4
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	_memcpy
	mov	a,sp
	add	a,#0xfb
	mov	sp,a
	pop	ar7
	pop	ar6
	pop	ar5
	pop	ar7
	pop	ar6
	pop	ar5
	sjmp	00133$
00132$:
;	../../Common/modules/cIPv6.c:498: memcpy(buf->src_sa.address,ori_address, 2);
	push	ar5
	push	ar6
	push	ar7
	mov	a,_bp
	add	a,#0x14
	mov	r0,a
	mov	ar2,@r0
	mov	r3,#0x00
	mov	r4,#0x40
	mov	r0,_bp
	inc	r0
	mov	a,#0x10
	add	a,@r0
	mov	r5,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r6,a
	inc	r0
	mov	ar7,@r0
	inc	r5
	cjne	r5,#0x00,00236$
	inc	r6
00236$:
	push	ar5
	push	ar6
	push	ar7
	mov	a,#0x02
	push	acc
	clr	a
	push	acc
	push	ar2
	push	ar3
	push	ar4
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	_memcpy
	mov	a,sp
	add	a,#0xfb
	mov	sp,a
	pop	ar7
	pop	ar6
	pop	ar5
;	../../Common/modules/cIPv6.c:583: buf=0;
	pop	ar7
	pop	ar6
	pop	ar5
;	../../Common/modules/cIPv6.c:498: memcpy(buf->src_sa.address,ori_address, 2);
00133$:
;	../../Common/modules/cIPv6.c:500: buf->src_sa.addr_type = o_addrtype;
	mov	r0,_bp
	inc	r0
	mov	a,#0x10
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,_bp
	add	a,#0x09
	mov	r0,a
	mov	a,@r0
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:501: if(address_mode == BCAST)
	mov	a,_bp
	add	a,#0x1e
	mov	r0,a
	mov	a,@r0
	jnz	00237$
	ljmp	00138$
00237$:
;	../../Common/modules/cIPv6.c:504: if(bc_seq != cipv6_pib.last_forwarded_bc_sqn )
	mov	dptr,#(_cipv6_pib + 0x0001)
	movx	a,@dptr
	mov	r2,a
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	mov	a,@r0
	cjne	a,ar2,00238$
	sjmp	00135$
00238$:
;	../../Common/modules/cIPv6.c:534: buf->buf_ptr = ind;
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	ar2,@r0
	mov	r3,#0x00
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	mov	a,r2
	lcall	__gptrput
	inc	dptr
	mov	a,r3
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:535: buf->to = MODULE_NONE;
	mov	r0,_bp
	inc	r0
	mov	a,#0x1E
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	clr	a
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:536: buf->from = MODULE_CIPV6;
	mov	r0,_bp
	inc	r0
	mov	a,#0x1D
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,#0x01
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:537: stack_buffer_push(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_push
;	../../Common/modules/cIPv6.c:538: buf=0;
	mov	r0,_bp
	inc	r0
	clr	a
	mov	@r0,a
	inc	r0
	mov	@r0,a
	inc	r0
	mov	@r0,a
	sjmp	00138$
00135$:
;	../../Common/modules/cIPv6.c:542: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_free
;	../../Common/modules/cIPv6.c:543: buf=0;
	mov	r0,_bp
	inc	r0
	clr	a
	mov	@r0,a
	inc	r0
	mov	@r0,a
	inc	r0
	mov	@r0,a
00138$:
;	../../Common/modules/cIPv6.c:546: if(buf)
	mov	r0,_bp
	inc	r0
	mov	a,@r0
	inc	r0
	orl	a,@r0
	inc	r0
	orl	a,@r0
	jnz	00239$
	ljmp	00150$
00239$:
;	../../Common/modules/cIPv6.c:549: if(hoplimit >= 1 )
	mov	a,_bp
	add	a,#0x07
	mov	r0,a
	cjne	@r0,#0x01,00240$
00240$:
	jc	00150$
;	../../Common/modules/cIPv6.c:551: buf->buf_ptr = ind; /*cut header*/
	mov	r0,_bp
	inc	r0
	mov	a,#0x20
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	ar5,@r0
	mov	r6,#0x00
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,r5
	lcall	__gptrput
	inc	dptr
	mov	a,r6
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:552: buf->from = MODULE_CIPV6;
	mov	r0,_bp
	inc	r0
	mov	a,#0x1D
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,#0x01
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:553: buf->to = MODULE_NONE;
	mov	r0,_bp
	inc	r0
	mov	a,#0x1E
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	clr	a
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:554: stack_buffer_push(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_push
;	../../Common/modules/cIPv6.c:555: buf=0;
	mov	r0,_bp
	inc	r0
	clr	a
	mov	@r0,a
	inc	r0
	mov	@r0,a
	inc	r0
	mov	@r0,a
;	../../Common/modules/cIPv6.c:578: }
00150$:
;	../../Common/modules/cIPv6.c:580: if(buf)
	mov	r0,_bp
	inc	r0
	mov	a,@r0
	inc	r0
	orl	a,@r0
	inc	r0
	orl	a,@r0
	jz	00161$
;	../../Common/modules/cIPv6.c:582: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_free
;	../../Common/modules/cIPv6.c:583: buf=0;
00161$:
	mov	sp,_bp
	pop	_bp
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'build_lowpan_header'
;------------------------------------------------------------
;buf                       Allocated to stack - offset 1
;mesh_header               Allocated to stack - offset 4
;header_size               Allocated to stack - offset 5
;destination_delivery      Allocated to registers r5 
;dptr                      Allocated to stack - offset 6
;route_check               Allocated to stack - offset 9
;i                         Allocated to stack - offset 22
;dest_length               Allocated to stack - offset 23
;sloc0                     Allocated to stack - offset 25
;sloc1                     Allocated to stack - offset 24
;sloc2                     Allocated to stack - offset 27
;sloc3                     Allocated to stack - offset 30
;sloc4                     Allocated to stack - offset 33
;------------------------------------------------------------
;	../../Common/modules/cIPv6.c:768: portCHAR build_lowpan_header(buffer_t *buf)
;	-----------------------------------------
;	 function build_lowpan_header
;	-----------------------------------------
_build_lowpan_header:
	push	_bp
	mov	_bp,sp
	push	dpl
	push	dph
	push	b
	mov	a,sp
	add	a,#0x23
	mov	sp,a
;	../../Common/modules/cIPv6.c:776: route_check.status=0;
	mov	a,_bp
	add	a,#0x09
	mov	r0,a
	mov	@r0,#0x00
;	../../Common/modules/cIPv6.c:777: mesh_header = MESH_ROUTING_TYPE;
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	@r0,#0x01
;	../../Common/modules/cIPv6.c:779: header_size = 3;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	@r0,#0x03
;	../../Common/modules/cIPv6.c:780: if((buf->from == MODULE_CUDP) && buf->options.lowpan_compressed)
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x18
	mov	r1,a
	mov	a,#0x1D
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x18
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	__gptrget
	mov	r2,a
	cjne	r2,#0x02,00102$
	mov	r0,_bp
	inc	r0
	mov	a,#0x26
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,#0x05
	add	a,r2
	mov	r2,a
	clr	a
	addc	a,r3
	mov	r3,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	jz	00102$
;	../../Common/modules/cIPv6.c:782: header_size++;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	@r0,#0x04
00102$:
;	../../Common/modules/cIPv6.c:785: if(cipv6_pib.use_short_address)
	mov	dptr,#(_cipv6_pib + 0x000c)
	movx	a,@dptr
	jz	00105$
;	../../Common/modules/cIPv6.c:787: mesh_header |= O_ADDRESSTYPE_16;
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	@r0,#0x05
;	../../Common/modules/cIPv6.c:788: header_size +=2;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	inc	@r0
	inc	@r0
	sjmp	00106$
00105$:
;	../../Common/modules/cIPv6.c:793: header_size +=8;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	a,#0x08
	add	a,@r0
	mov	@r0,a
00106$:
;	../../Common/modules/cIPv6.c:797: switch(buf->dst_sa.addr_type)
	mov	r0,_bp
	inc	r0
	mov	a,#0x03
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r5,a
	cjne	r5,#0x01,00197$
	sjmp	00110$
00197$:
	cjne	r5,#0x03,00198$
	sjmp	00109$
00198$:
	cjne	r5,#0x04,00199$
	sjmp	00111$
00199$:
	cjne	r5,#0x08,00200$
	sjmp	00108$
00200$:
	cjne	r5,#0x09,00113$
;	../../Common/modules/cIPv6.c:800: destination_delivery = NEIGHBOR;
	mov	r5,#0x01
;	../../Common/modules/cIPv6.c:801: break;
	ljmp	00117$
;	../../Common/modules/cIPv6.c:803: case ADDR_BROADCAST:
00108$:
;	../../Common/modules/cIPv6.c:804: mesh_header |= D_ADDRESSTYPE_16;
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,@r0
	orl	a,#0x08
	mov	@r0,a
;	../../Common/modules/cIPv6.c:805: header_size +=2;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	inc	@r0
	inc	@r0
;	../../Common/modules/cIPv6.c:806: destination_delivery = BROADCAST;
	mov	r5,#0x00
;	../../Common/modules/cIPv6.c:807: break;
	ljmp	00117$
;	../../Common/modules/cIPv6.c:809: case ADDR_802_15_4_PAN_SHORT:
00109$:
;	../../Common/modules/cIPv6.c:810: mesh_header |= D_ADDRESSTYPE_16;
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,@r0
	orl	a,#0x08
	mov	@r0,a
;	../../Common/modules/cIPv6.c:811: header_size +=2;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	inc	@r0
	inc	@r0
;	../../Common/modules/cIPv6.c:812: goto mesh_neighbour_check;
;	../../Common/modules/cIPv6.c:814: case ADDR_802_15_4_LONG:
	sjmp	00113$
00110$:
;	../../Common/modules/cIPv6.c:815: buf->dst_sa.addr_type = ADDR_802_15_4_PAN_LONG;			
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,#0x04
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:816: case ADDR_802_15_4_PAN_LONG:
00111$:
;	../../Common/modules/cIPv6.c:818: header_size +=8;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	a,#0x08
	add	a,@r0
	mov	@r0,a
;	../../Common/modules/cIPv6.c:821: mesh_neighbour_check:			
00113$:
;	../../Common/modules/cIPv6.c:823: destination_delivery = check_neighbour_table(buf->dst_sa.addr_type, buf->dst_sa.address);
	mov	r0,_bp
	inc	r0
	mov	a,#0x03
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar5,@r0
	mov	a,#0x01
	add	a,r3
	mov	r6,a
	clr	a
	addc	a,r4
	mov	r7,a
	mov	ar2,r5
	mov	dpl,r3
	mov	dph,r4
	mov	b,r5
	lcall	__gptrget
	mov	r3,a
	push	ar6
	push	ar7
	push	ar2
	mov	dpl,r3
	lcall	_check_neighbour_table
	mov	r2,dpl
	dec	sp
	dec	sp
	dec	sp
	mov	ar5,r2
;	../../Common/modules/cIPv6.c:824: if(destination_delivery==BROADCAST && buf->dst_sa.addr_type==ADDR_802_15_4_PAN_LONG)
	mov	a,r5
	jnz	00117$
	mov	r0,_bp
	inc	r0
	mov	a,#0x03
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	cjne	r2,#0x04,00117$
;	../../Common/modules/cIPv6.c:826: header_size -=6;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	a,@r0
	add	a,#0xfa
	mov	@r0,a
;	../../Common/modules/cIPv6.c:828: mesh_header |=D_ADDRESSTYPE_16;
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,@r0
	orl	a,#0x08
	mov	@r0,a
;	../../Common/modules/cIPv6.c:831: }
00117$:
;	../../Common/modules/cIPv6.c:832: switch (destination_delivery)
	cjne	r5,#0x00,00206$
	ljmp	00139$
00206$:
	cjne	r5,#0x01,00207$
	ljmp	00133$
00207$:
	cjne	r5,#0x02,00208$
	sjmp	00209$
00208$:
	ljmp	00142$
00209$:
;	../../Common/modules/cIPv6.c:839: route_check.status = 0;
	mov	a,_bp
	add	a,#0x09
	mov	r0,a
	mov	@r0,#0x00
;	../../Common/modules/cIPv6.c:844: if(route_check.status == 1)
	mov	ar2,@r0
	cjne	r2,#0x01,00210$
	sjmp	00123$
00210$:
;	../../Common/modules/cIPv6.c:861: header_size+=3;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	inc	@r0
	inc	@r0
	inc	@r0
;	../../Common/modules/cIPv6.c:865: if(stack_buffer_headroom( buf,header_size)==pdFALSE)
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	ar6,@r0
	mov	r2,#0x00
	push	ar6
	push	ar2
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_headroom
	mov	r2,dpl
	dec	sp
	dec	sp
	mov	a,r2
	jnz	00123$
;	../../Common/modules/cIPv6.c:867: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_free
;	../../Common/modules/cIPv6.c:868: return pdFALSE;
	mov	dpl,#0x00
	ljmp	00160$
00123$:
;	../../Common/modules/cIPv6.c:871: buf->buf_ptr -= header_size; /* mesh_header+address_field+HC1_DISPATCH+ HC1*/
	mov	r0,_bp
	inc	r0
	mov	a,#0x20
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	lcall	__gptrget
	mov	@r0,a
	inc	dptr
	lcall	__gptrget
	inc	r0
	mov	@r0,a
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	ar7,@r0
	mov	r5,#0x00
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	mov	a,@r0
	clr	c
	subb	a,r7
	mov	r7,a
	inc	r0
	mov	a,@r0
	subb	a,r5
	mov	r5,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,r7
	lcall	__gptrput
	inc	dptr
	mov	a,r5
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:872: dptr = buffer_data_pointer(buf);
	mov	r0,_bp
	inc	r0
	mov	a,#0x2C
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,r7
	add	a,r2
	mov	r7,a
	mov	a,r5
	addc	a,r3
	mov	r5,a
	mov	ar6,r4
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	@r0,ar7
	inc	r0
	mov	@r0,ar5
	inc	r0
	mov	@r0,ar6
;	../../Common/modules/cIPv6.c:873: mesh_header |= BASIC_HOP_VALUE;
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,@r0
	orl	a,#0x40
	mov	@r0,a
;	../../Common/modules/cIPv6.c:874: *dptr++ = mesh_header;
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,_bp
	add	a,#0x04
	mov	r1,a
	mov	a,@r1
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
;	../../Common/modules/cIPv6.c:877: dptr += add_own_address(dptr);
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_add_own_address
	mov	r5,dpl
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	a,r5
	add	a,@r0
	mov	@r0,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	@r0,a
;	../../Common/modules/cIPv6.c:879: if(buf->dst_sa.addr_type == ADDR_802_15_4_PAN_SHORT)
	mov	r0,_bp
	inc	r0
	mov	a,#0x03
	add	a,@r0
	mov	r5,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r6,a
	inc	r0
	mov	ar7,@r0
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	__gptrget
	mov	r2,a
	cjne	r2,#0x03,00125$
;	../../Common/modules/cIPv6.c:881: dest_length=2;
	mov	a,_bp
	add	a,#0x17
	mov	r0,a
	mov	@r0,#0x02
	sjmp	00179$
00125$:
;	../../Common/modules/cIPv6.c:885: dest_length=8;
	mov	a,_bp
	add	a,#0x17
	mov	r0,a
	mov	@r0,#0x08
;	../../Common/modules/cIPv6.c:887: for(i=0; i<dest_length ;i++)
00179$:
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x1b
	mov	r1,a
	mov	a,#0x03
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	mov	a,_bp
	add	a,#0x1e
	mov	r1,a
	mov	a,#0x01
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	a,_bp
	add	a,#0x21
	mov	r1,a
	mov	a,@r0
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	r3,#0x00
00152$:
	mov	a,_bp
	add	a,#0x17
	mov	r0,a
	clr	c
	mov	a,r3
	subb	a,@r0
	jnc	00191$
;	../../Common/modules/cIPv6.c:889: *dptr++ = buf->dst_sa.address[i];
	push	ar5
	push	ar6
	push	ar7
	mov	a,_bp
	add	a,#0x1e
	mov	r0,a
	mov	a,r3
	add	a,@r0
	mov	r4,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r5,a
	inc	r0
	mov	ar6,@r0
	mov	dpl,r4
	mov	dph,r5
	mov	b,r6
	lcall	__gptrget
	mov	r4,a
	mov	a,_bp
	add	a,#0x21
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,r4
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
	mov	a,_bp
	add	a,#0x21
	mov	r0,a
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	a,@r0
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
;	../../Common/modules/cIPv6.c:887: for(i=0; i<dest_length ;i++)
	inc	r3
	pop	ar7
	pop	ar6
	pop	ar5
	sjmp	00152$
00191$:
	mov	a,_bp
	add	a,#0x21
	mov	r0,a
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	a,@r0
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
;	../../Common/modules/cIPv6.c:892: if( route_check.status == 0)
	mov	a,_bp
	add	a,#0x09
	mov	r0,a
	mov	a,@r0
	jnz	00131$
;	../../Common/modules/cIPv6.c:897: buf->dst_sa.addr_type = ADDR_BROADCAST;
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	mov	a,#0x08
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:899: *dptr++ = LOWPAN_BC0;
	mov	a,_bp
	add	a,#0x21
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,#0x09
	lcall	__gptrput
	mov	a,_bp
	add	a,#0x21
	mov	r0,a
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	a,#0x01
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
;	../../Common/modules/cIPv6.c:900: *dptr++ = cipv6_pib.own_brodcast_sqn;
	mov	dptr,#_cipv6_pib
	movx	a,@dptr
	mov	r3,a
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,r3
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
;	../../Common/modules/cIPv6.c:901: update_ip_sqn();
	lcall	_update_ip_sqn
	ljmp	00143$
00131$:
;	../../Common/modules/cIPv6.c:906: if(route_check.address_type == ADDR_802_15_4_PAN_LONG)
	mov	a,_bp
	add	a,#0x09
	mov	r3,a
	inc	a
	mov	r0,a
	mov	ar4,@r0
	cjne	r4,#0x04,00128$
;	../../Common/modules/cIPv6.c:907: dest_length=10;
	mov	a,_bp
	add	a,#0x17
	mov	r0,a
	mov	@r0,#0x0A
	sjmp	00183$
00128$:
;	../../Common/modules/cIPv6.c:909: dest_length=4;
	mov	a,_bp
	add	a,#0x17
	mov	r0,a
	mov	@r0,#0x04
;	../../Common/modules/cIPv6.c:911: for(i=0;i<dest_length; i++)
00183$:
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	mov	a,_bp
	add	a,#0x21
	mov	r1,a
	mov	a,#0x01
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	inc	r3
	inc	r3
	mov	a,_bp
	add	a,#0x16
	mov	r0,a
	mov	@r0,#0x00
00156$:
	mov	a,_bp
	add	a,#0x16
	mov	r0,a
	mov	a,_bp
	add	a,#0x17
	mov	r1,a
	clr	c
	mov	a,@r0
	subb	a,@r1
	jnc	00159$
;	../../Common/modules/cIPv6.c:913: buf->dst_sa.address[i]=route_check.next_hop[i];
	push	ar4
	mov	a,_bp
	add	a,#0x21
	mov	r0,a
	mov	a,_bp
	add	a,#0x16
	mov	r1,a
	mov	a,@r1
	add	a,@r0
	push	acc
	clr	a
	inc	r0
	addc	a,@r0
	push	acc
	inc	r0
	mov	a,@r0
	push	acc
	mov	a,_bp
	add	a,#0x1d
	mov	r0,a
	pop	acc
	mov	@r0,a
	dec	r0
	pop	acc
	mov	@r0,a
	dec	r0
	pop	acc
	mov	@r0,a
	mov	a,_bp
	add	a,#0x16
	mov	r1,a
	mov	a,@r1
	add	a,r3
	mov	r0,a
	mov	ar2,@r0
	mov	a,_bp
	add	a,#0x1b
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,r2
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:911: for(i=0;i<dest_length; i++)
	mov	a,_bp
	add	a,#0x16
	mov	r0,a
	inc	@r0
	pop	ar4
	sjmp	00156$
00159$:
;	../../Common/modules/cIPv6.c:915: buf->dst_sa.addr_type = route_check.address_type;
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	mov	a,r4
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:917: break;
	ljmp	00143$
;	../../Common/modules/cIPv6.c:919: case NEIGHBOR:
00133$:
;	../../Common/modules/cIPv6.c:923: header_size = 3;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	@r0,#0x03
;	../../Common/modules/cIPv6.c:924: if(buf->options.lowpan_compressed && buf->from == MODULE_CUDP)
	mov	r0,_bp
	inc	r0
	mov	a,#0x26
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,#0x05
	add	a,r2
	mov	r2,a
	clr	a
	addc	a,r3
	mov	r3,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	jz	00135$
	mov	a,_bp
	add	a,#0x18
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	__gptrget
	mov	r2,a
	cjne	r2,#0x02,00135$
;	../../Common/modules/cIPv6.c:925: header_size++;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	@r0,#0x04
00135$:
;	../../Common/modules/cIPv6.c:927: if(stack_buffer_headroom(buf,header_size) == pdFALSE)
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	ar6,@r0
	mov	r2,#0x00
	push	ar6
	push	ar2
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_headroom
	mov	r2,dpl
	dec	sp
	dec	sp
	mov	a,r2
	jnz	00138$
;	../../Common/modules/cIPv6.c:929: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_free
;	../../Common/modules/cIPv6.c:931: return pdTRUE;
	mov	dpl,#0x01
	ljmp	00160$
00138$:
;	../../Common/modules/cIPv6.c:933: buf->buf_ptr -= header_size; 				/* lowpan-dispatch+HC1 = header space */
	mov	r0,_bp
	inc	r0
	mov	a,#0x20
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,_bp
	add	a,#0x21
	mov	r0,a
	lcall	__gptrget
	mov	@r0,a
	inc	dptr
	lcall	__gptrget
	inc	r0
	mov	@r0,a
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	ar7,@r0
	mov	r5,#0x00
	mov	a,_bp
	add	a,#0x21
	mov	r0,a
	mov	a,@r0
	clr	c
	subb	a,r7
	mov	r7,a
	inc	r0
	mov	a,@r0
	subb	a,r5
	mov	r5,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,r7
	lcall	__gptrput
	inc	dptr
	mov	a,r5
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:934: dptr = buffer_data_pointer(buf);
	mov	r0,_bp
	inc	r0
	mov	a,#0x2C
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,r7
	add	a,r2
	mov	r7,a
	mov	a,r5
	addc	a,r3
	mov	r5,a
	mov	ar6,r4
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	@r0,ar7
	inc	r0
	mov	@r0,ar5
	inc	r0
	mov	@r0,ar6
;	../../Common/modules/cIPv6.c:935: break;
	ljmp	00143$
;	../../Common/modules/cIPv6.c:937: case BROADCAST:
00139$:
;	../../Common/modules/cIPv6.c:941: header_size +=3;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	inc	@r0
	inc	@r0
	inc	@r0
;	../../Common/modules/cIPv6.c:942: if(stack_buffer_headroom(buf,header_size) == pdFALSE)
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	ar6,@r0
	mov	r2,#0x00
	push	ar6
	push	ar2
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_headroom
	mov	r2,dpl
	dec	sp
	dec	sp
	mov	a,r2
	jnz	00141$
;	../../Common/modules/cIPv6.c:944: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_free
;	../../Common/modules/cIPv6.c:946: return pdTRUE;
	mov	dpl,#0x01
	ljmp	00160$
00141$:
;	../../Common/modules/cIPv6.c:948: buf->buf_ptr -= header_size; /* lowpan-dispatch+HC1 = header space */
	mov	r0,_bp
	inc	r0
	mov	a,#0x20
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,_bp
	add	a,#0x21
	mov	r0,a
	lcall	__gptrget
	mov	@r0,a
	inc	dptr
	lcall	__gptrget
	inc	r0
	mov	@r0,a
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	ar7,@r0
	mov	r5,#0x00
	mov	a,_bp
	add	a,#0x21
	mov	r0,a
	mov	a,@r0
	clr	c
	subb	a,r7
	mov	r7,a
	inc	r0
	mov	a,@r0
	subb	a,r5
	mov	r5,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,r7
	lcall	__gptrput
	inc	dptr
	mov	a,r5
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:949: dptr = buffer_data_pointer(buf);
	mov	r0,_bp
	inc	r0
	mov	a,#0x2C
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,r7
	add	a,r2
	mov	r7,a
	mov	a,r5
	addc	a,r3
	mov	r5,a
	mov	ar6,r4
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	@r0,ar7
	inc	r0
	mov	@r0,ar5
	inc	r0
	mov	@r0,ar6
;	../../Common/modules/cIPv6.c:961: *dptr++ = (mesh_header | (1<<4));
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,#0x10
	orl	a,@r0
	mov	r2,a
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,r2
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
;	../../Common/modules/cIPv6.c:964: buf->dst_sa.addr_type = ADDR_BROADCAST;
	mov	r0,_bp
	inc	r0
	mov	a,#0x03
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,#0x08
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:965: buf->src_sa.addr_type = ADDR_NONE;
	mov	r0,_bp
	inc	r0
	mov	a,#0x10
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	clr	a
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:967: dptr += add_own_address(dptr);
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_add_own_address
	mov	r2,dpl
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	a,r2
	add	a,@r0
	mov	@r0,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	@r0,a
;	../../Common/modules/cIPv6.c:969: *dptr++ = 0xff;
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,#0xFF
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
;	../../Common/modules/cIPv6.c:970: *dptr++ = 0xff;
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,#0xFF
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
;	../../Common/modules/cIPv6.c:973: *dptr++ = LOWPAN_BC0;
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,#0x09
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
;	../../Common/modules/cIPv6.c:974: *dptr++ = cipv6_pib.own_brodcast_sqn;
	mov	dptr,#_cipv6_pib
	movx	a,@dptr
	mov	r2,a
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,r2
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
;	../../Common/modules/cIPv6.c:975: update_ip_sqn();
	lcall	_update_ip_sqn
;	../../Common/modules/cIPv6.c:976: break;
;	../../Common/modules/cIPv6.c:978: default:
	sjmp	00143$
00142$:
;	../../Common/modules/cIPv6.c:982: dptr = 0;
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	clr	a
	mov	@r0,a
	inc	r0
	mov	@r0,a
	inc	r0
	mov	@r0,a
;	../../Common/modules/cIPv6.c:983: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_free
;	../../Common/modules/cIPv6.c:984: buf=0;
	mov	r0,_bp
	inc	r0
	clr	a
	mov	@r0,a
	inc	r0
	mov	@r0,a
	inc	r0
	mov	@r0,a
;	../../Common/modules/cIPv6.c:986: }
00143$:
;	../../Common/modules/cIPv6.c:988: if(buf)
	mov	r0,_bp
	inc	r0
	mov	a,@r0
	inc	r0
	orl	a,@r0
	inc	r0
	orl	a,@r0
	jnz	00224$
	ljmp	00151$
00224$:
;	../../Common/modules/cIPv6.c:990: *dptr++ = LOWPAN_HC1; 	/* LowPan Dispatch	 */
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,#0x42
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
;	../../Common/modules/cIPv6.c:992: if(buf->from == MODULE_ICMP)
	mov	r0,_bp
	inc	r0
	mov	a,#0x1D
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r5,a
	cjne	r5,#0x04,00148$
;	../../Common/modules/cIPv6.c:993: *dptr++ = IP_HEADER_FOR_ICMP;
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,#0x5F
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
	sjmp	00149$
00148$:
;	../../Common/modules/cIPv6.c:996: if(buf->options.lowpan_compressed)
	mov	r0,_bp
	inc	r0
	mov	a,#0x26
	add	a,@r0
	mov	r5,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r6,a
	inc	r0
	mov	ar7,@r0
	mov	a,#0x05
	add	a,r5
	mov	r5,a
	clr	a
	addc	a,r6
	mov	r6,a
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	__gptrget
	mov	r5,a
	jz	00145$
;	../../Common/modules/cIPv6.c:998: *dptr++ = HC1_NEXT_HEADER_COMPRESSED_UDP;
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,#0xBF
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
;	../../Common/modules/cIPv6.c:999: *dptr++ = buf->options.lowpan_compressed;
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,r5
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
	sjmp	00149$
00145$:
;	../../Common/modules/cIPv6.c:1002: *dptr++ = HC1_NEXT_HEADER_UNCOMPRES_UDP;
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,#0x3F
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
00149$:
;	../../Common/modules/cIPv6.c:1004: *dptr++ = GENERAL_HOPLIMIT;	/* Hop-limit	*/
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,#0x16
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:1005: buf->from = MODULE_CIPV6;
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,#0x01
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:1006: buf->to = MODULE_NONE;
	mov	r0,_bp
	inc	r0
	mov	a,#0x1E
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	clr	a
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:1007: stack_buffer_push(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_push
;	../../Common/modules/cIPv6.c:1008: buf=0;
00151$:
;	../../Common/modules/cIPv6.c:1010: return pdTRUE;
	mov	dpl,#0x01
00160$:
	mov	sp,_bp
	pop	_bp
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'add_own_address'
;------------------------------------------------------------
;d_ptr                     Allocated to registers r2 r3 r4 
;i                         Allocated to registers r0 
;------------------------------------------------------------
;	../../Common/modules/cIPv6.c:1013: uint8_t add_own_address(uint8_t *d_ptr)
;	-----------------------------------------
;	 function add_own_address
;	-----------------------------------------
_add_own_address:
	mov	r2,dpl
	mov	r3,dph
	mov	r4,b
;	../../Common/modules/cIPv6.c:1016: if(cipv6_pib.use_short_address)
	mov	dptr,#(_cipv6_pib + 0x000c)
	movx	a,@dptr
	jz	00118$
;	../../Common/modules/cIPv6.c:1018: for (i=0; i<2; i++)
	mov	ar5,r2
	mov	ar6,r3
	mov	ar7,r4
	mov	r0,#0x00
00104$:
	cjne	r0,#0x02,00122$
00122$:
	jnc	00107$
;	../../Common/modules/cIPv6.c:1020: *d_ptr++ = cipv6_pib.short_address[i];
	mov	a,r0
	add	a,#(_cipv6_pib + 0x000a)
	mov	dpl,a
	clr	a
	addc	a,#((_cipv6_pib + 0x000a) >> 8)
	mov	dph,a
	movx	a,@dptr
	mov	r1,a
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	__gptrput
	inc	dptr
	mov	r5,dpl
	mov	r6,dph
;	../../Common/modules/cIPv6.c:1018: for (i=0; i<2; i++)
	inc	r0
	sjmp	00104$
00107$:
;	../../Common/modules/cIPv6.c:1022: return 2;
	mov	dpl,#0x02
;	../../Common/modules/cIPv6.c:1026: for (i=0; i<8; i++)
	ret
00118$:
	mov	r5,#0x00
00108$:
	cjne	r5,#0x08,00124$
00124$:
	jnc	00111$
;	../../Common/modules/cIPv6.c:1028: *d_ptr++ = cipv6_pib.long_address[i];
	mov	a,r5
	add	a,#(_cipv6_pib + 0x0002)
	mov	dpl,a
	clr	a
	addc	a,#((_cipv6_pib + 0x0002) >> 8)
	mov	dph,a
	movx	a,@dptr
	mov	r6,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrput
	inc	dptr
	mov	r2,dpl
	mov	r3,dph
;	../../Common/modules/cIPv6.c:1026: for (i=0; i<8; i++)
	inc	r5
	sjmp	00108$
00111$:
;	../../Common/modules/cIPv6.c:1030: return 8;
	mov	dpl,#0x08
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'update_ip_sqn'
;------------------------------------------------------------
;------------------------------------------------------------
;	../../Common/modules/cIPv6.c:1034: void update_ip_sqn(void)
;	-----------------------------------------
;	 function update_ip_sqn
;	-----------------------------------------
_update_ip_sqn:
;	../../Common/modules/cIPv6.c:1036: cipv6_pib.last_forwarded_bc_sqn = cipv6_pib.own_brodcast_sqn;
	mov	dptr,#_cipv6_pib
	movx	a,@dptr
	mov	r2,a
	mov	dptr,#(_cipv6_pib + 0x0001)
	movx	@dptr,a
;	../../Common/modules/cIPv6.c:1038: if(cipv6_pib.own_brodcast_sqn==0xff) cipv6_pib.own_brodcast_sqn=1;
	cjne	r2,#0xFF,00102$
	mov	dptr,#_cipv6_pib
	mov	a,#0x01
	movx	@dptr,a
	ret
00102$:
;	../../Common/modules/cIPv6.c:1039: else cipv6_pib.own_brodcast_sqn++;
	mov	dptr,#_cipv6_pib
	movx	a,@dptr
	mov	r2,a
	inc	r2
	mov	dptr,#_cipv6_pib
	mov	a,r2
	movx	@dptr,a
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'build_ipv6_header'
;------------------------------------------------------------
;buf                       Allocated to stack - offset 1
;next_header               Allocated to stack - offset 4
;i                         Allocated to stack - offset 5
;dptr                      Allocated to stack - offset 6
;payload_length            Allocated to stack - offset 9
;ipv6_address              Allocated to stack - offset 11
;destination_delivery      Allocated to registers r2 
;sloc0                     Allocated to stack - offset 21
;sloc1                     Allocated to stack - offset 25
;sloc2                     Allocated to stack - offset 26
;sloc3                     Allocated to stack - offset 24
;------------------------------------------------------------
;	../../Common/modules/cIPv6.c:1048: portCHAR build_ipv6_header(buffer_t *buf)
;	-----------------------------------------
;	 function build_ipv6_header
;	-----------------------------------------
_build_ipv6_header:
	push	_bp
	mov	_bp,sp
	push	dpl
	push	dph
	push	b
	mov	a,sp
	add	a,#0x1a
	mov	sp,a
;	../../Common/modules/cIPv6.c:1055: memset(ipv6_address, 0,8);
	mov	a,_bp
	add	a,#0x0b
	mov	r0,a
	mov	ar5,r0
	mov	r6,#0x00
	mov	r7,#0x40
	push	ar0
	mov	a,#0x08
	push	acc
	clr	a
	push	acc
	clr	a
	push	acc
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	_memset
	dec	sp
	dec	sp
	dec	sp
;	../../Common/modules/cIPv6.c:1056: payload_length = (buf->buf_end - buf->buf_ptr);
	mov	r1,_bp
	inc	r1
	mov	a,#0x22
	add	a,@r1
	mov	r5,a
	clr	a
	inc	r1
	addc	a,@r1
	mov	r6,a
	inc	r1
	mov	ar7,@r1
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	__gptrget
	mov	r5,a
	inc	dptr
	lcall	__gptrget
	mov	r6,a
	mov	r1,_bp
	inc	r1
	mov	a,#0x20
	add	a,@r1
	mov	r7,a
	clr	a
	inc	r1
	addc	a,@r1
	mov	r2,a
	inc	r1
	mov	ar3,@r1
	mov	dpl,r7
	mov	dph,r2
	mov	b,r3
	lcall	__gptrget
	mov	r7,a
	inc	dptr
	lcall	__gptrget
	mov	r2,a
	mov	a,r5
	clr	c
	subb	a,r7
	mov	r5,a
	mov	a,r6
	subb	a,r2
	mov	r6,a
	mov	a,_bp
	add	a,#0x09
	mov	r1,a
	mov	@r1,ar5
	inc	r1
	mov	@r1,ar6
;	../../Common/modules/cIPv6.c:1058: if(stack_buffer_headroom( buf,41)==pdFALSE)
	mov	a,#0x29
	push	acc
	clr	a
	push	acc
	mov	r1,_bp
	inc	r1
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	lcall	_stack_buffer_headroom
	mov	r4,dpl
	dec	sp
	dec	sp
	pop	ar0
	mov	a,r4
	jnz	00102$
;	../../Common/modules/cIPv6.c:1060: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_free
;	../../Common/modules/cIPv6.c:1061: return pdTRUE;
	mov	dpl,#0x01
	ljmp	00147$
00102$:
;	../../Common/modules/cIPv6.c:1063: buf->buf_ptr -= 41;
	mov	r1,_bp
	inc	r1
	mov	a,#0x20
	add	a,@r1
	mov	r4,a
	clr	a
	inc	r1
	addc	a,@r1
	mov	r5,a
	inc	r1
	mov	ar6,@r1
	mov	dpl,r4
	mov	dph,r5
	mov	b,r6
	lcall	__gptrget
	mov	r7,a
	inc	dptr
	lcall	__gptrget
	mov	r2,a
	mov	a,r7
	add	a,#0xd7
	mov	r7,a
	mov	a,r2
	addc	a,#0xff
	mov	r2,a
	mov	dpl,r4
	mov	dph,r5
	mov	b,r6
	mov	a,r7
	lcall	__gptrput
	inc	dptr
	mov	a,r2
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:1065: if(buf->dst_sa.addr_type != ADDR_BROADCAST && buf->dst_sa.addr_type != ADDR_COORDINATOR)
	mov	r1,_bp
	inc	r1
	push	ar0
	mov	a,_bp
	add	a,#0x15
	mov	r0,a
	mov	a,#0x03
	add	a,@r1
	mov	@r0,a
	clr	a
	inc	r1
	addc	a,@r1
	inc	r0
	mov	@r0,a
	inc	r1
	inc	r0
	mov	a,@r1
	mov	@r0,a
	pop	ar0
	mov	a,_bp
	add	a,#0x15
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	lcall	__gptrget
	mov	r2,a
	clr	a
	cjne	r2,#0x08,00180$
	inc	a
00180$:
	jnz	00106$
	cjne	r2,#0x09,00183$
	sjmp	00106$
00183$:
;	../../Common/modules/cIPv6.c:1067: destination_delivery = check_neighbour_table(buf->dst_sa.addr_type, buf->dst_sa.address);
	mov	r1,_bp
	inc	r1
	mov	a,#0x03
	add	a,@r1
	mov	r2,a
	clr	a
	inc	r1
	addc	a,@r1
	mov	r3,a
	inc	r1
	mov	ar7,@r1
	mov	a,_bp
	add	a,#0x18
	mov	r1,a
	mov	a,#0x01
	add	a,r2
	mov	@r1,a
	clr	a
	addc	a,r3
	inc	r1
	mov	@r1,a
	inc	r1
	mov	@r1,ar7
	mov	dpl,r2
	mov	dph,r3
	mov	b,r7
	lcall	__gptrget
	mov	r2,a
	push	ar4
	push	ar5
	push	ar6
	push	ar0
	mov	a,_bp
	add	a,#0x18
	mov	r1,a
	mov	a,@r1
	push	acc
	inc	r1
	mov	a,@r1
	push	acc
	inc	r1
	mov	a,@r1
	push	acc
	mov	dpl,r2
	lcall	_check_neighbour_table
	mov	r2,dpl
	dec	sp
	dec	sp
	dec	sp
	pop	ar0
	pop	ar6
	pop	ar5
	pop	ar4
;	../../Common/modules/cIPv6.c:1068: if(destination_delivery==BROADCAST)
	mov	a,r2
	jnz	00106$
;	../../Common/modules/cIPv6.c:1070: buf->dst_sa.addr_type = ADDR_BROADCAST;
	mov	r1,_bp
	inc	r1
	mov	a,#0x03
	add	a,@r1
	mov	r7,a
	clr	a
	inc	r1
	addc	a,@r1
	mov	r2,a
	inc	r1
	mov	ar3,@r1
	mov	dpl,r7
	mov	dph,r2
	mov	b,r3
	mov	a,#0x08
	lcall	__gptrput
00106$:
;	../../Common/modules/cIPv6.c:1073: if(buf->from == MODULE_CUDP)
	push	ar4
	push	ar5
	push	ar6
	mov	r1,_bp
	inc	r1
	push	ar0
	mov	a,_bp
	add	a,#0x18
	mov	r0,a
	mov	a,#0x1D
	add	a,@r1
	mov	@r0,a
	clr	a
	inc	r1
	addc	a,@r1
	inc	r0
	mov	@r0,a
	inc	r1
	inc	r0
	mov	a,@r1
	mov	@r0,a
	pop	ar0
	mov	a,_bp
	add	a,#0x18
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	lcall	__gptrget
	mov	r4,a
	clr	a
	cjne	r4,#0x02,00185$
	inc	a
00185$:
	pop	ar6
	pop	ar5
	pop	ar4
	jz	00109$
;	../../Common/modules/cIPv6.c:1074: next_header = NEXT_HEADER_UDP;
	mov	a,_bp
	add	a,#0x04
	mov	r1,a
	mov	@r1,#0x11
	sjmp	00110$
00109$:
;	../../Common/modules/cIPv6.c:1076: next_header = NEXT_HEADER_ICMP6;
	mov	a,_bp
	add	a,#0x04
	mov	r1,a
	mov	@r1,#0x3A
00110$:
;	../../Common/modules/cIPv6.c:1079: dptr = buf->buf + buf->buf_ptr;
	mov	r1,_bp
	inc	r1
	mov	a,#0x2C
	add	a,@r1
	mov	r2,a
	clr	a
	inc	r1
	addc	a,@r1
	mov	r3,a
	inc	r1
	mov	ar7,@r1
	mov	dpl,r4
	mov	dph,r5
	mov	b,r6
	lcall	__gptrget
	mov	r4,a
	inc	dptr
	lcall	__gptrget
	mov	r5,a
	mov	a,r4
	add	a,r2
	mov	r2,a
	mov	a,r5
	addc	a,r3
	mov	r3,a
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	@r1,ar2
	inc	r1
	mov	@r1,ar3
	inc	r1
	mov	@r1,ar7
;	../../Common/modules/cIPv6.c:1080: *dptr++ = IPV6;
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	mov	a,#0x82
	lcall	__gptrput
	inc	dptr
	dec	r1
	dec	r1
	mov	@r1,dpl
	inc	r1
	mov	@r1,dph
;	../../Common/modules/cIPv6.c:1081: *dptr++ = 0x06;
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	mov	a,#0x06
	lcall	__gptrput
	inc	dptr
	dec	r1
	dec	r1
	mov	@r1,dpl
	inc	r1
	mov	@r1,dph
;	../../Common/modules/cIPv6.c:1082: *dptr++ = 0x00;
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	clr	a
	lcall	__gptrput
	inc	dptr
	dec	r1
	dec	r1
	mov	@r1,dpl
	inc	r1
	mov	@r1,dph
;	../../Common/modules/cIPv6.c:1083: *dptr++ = 0x00;
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	clr	a
	lcall	__gptrput
	inc	dptr
	dec	r1
	dec	r1
	mov	@r1,dpl
	inc	r1
	mov	@r1,dph
;	../../Common/modules/cIPv6.c:1084: *dptr++ = 0x00;
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	clr	a
	lcall	__gptrput
	inc	dptr
	dec	r1
	dec	r1
	mov	@r1,dpl
	inc	r1
	mov	@r1,dph
;	../../Common/modules/cIPv6.c:1085: *dptr++ = (payload_length >> 8);	
	mov	a,_bp
	add	a,#0x09
	mov	r1,a
	inc	r1
	mov	ar2,@r1
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	mov	a,r2
	lcall	__gptrput
	inc	dptr
	dec	r1
	dec	r1
	mov	@r1,dpl
	inc	r1
	mov	@r1,dph
;	../../Common/modules/cIPv6.c:1086: *dptr++ = (uint8_t) payload_length;			/* Length */
	mov	a,_bp
	add	a,#0x09
	mov	r1,a
	mov	ar2,@r1
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	mov	a,r2
	lcall	__gptrput
	inc	dptr
	dec	r1
	dec	r1
	mov	@r1,dpl
	inc	r1
	mov	@r1,dph
;	../../Common/modules/cIPv6.c:1087: *dptr++ = next_header;
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	push	ar0
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,@r0
	lcall	__gptrput
	inc	dptr
	dec	r1
	dec	r1
	mov	@r1,dpl
	inc	r1
	mov	@r1,dph
	pop	ar0
;	../../Common/modules/cIPv6.c:1088: *dptr++ = GENERAL_HOPLIMIT;
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	mov	a,#0x16
	lcall	__gptrput
	inc	dptr
	dec	r1
	dec	r1
	mov	@r1,dpl
	inc	r1
	mov	@r1,dph
;	../../Common/modules/cIPv6.c:1090: if(cipv6_pib.use_short_address)
	mov	dptr,#(_cipv6_pib + 0x000c)
	movx	a,@dptr
	jz	00156$
;	../../Common/modules/cIPv6.c:1092: ipv6_address[4]=0xff;
	mov	a,#0x04
	add	a,r0
	mov	r1,a
	mov	@r1,#0xFF
;	../../Common/modules/cIPv6.c:1093: ipv6_address[3]=0xfe;
	mov	a,#0x03
	add	a,r0
	mov	r1,a
	mov	@r1,#0xFE
;	../../Common/modules/cIPv6.c:1094: ipv6_address[1]=cipv6_pib.short_address[1];
	mov	a,r0
	inc	a
	mov	r1,a
	mov	dptr,#(_cipv6_pib + 0x000b)
	movx	a,@dptr
	mov	@r1,a
;	../../Common/modules/cIPv6.c:1095: ipv6_address[0]=cipv6_pib.short_address[0];
	mov	dptr,#(_cipv6_pib + 0x000a)
	movx	a,@dptr
	mov	r4,a
	mov	@r0,a
;	../../Common/modules/cIPv6.c:1099: for(i=0; i<8; i++)
	sjmp	00113$
00156$:
	mov	r4,#0x00
00122$:
	cjne	r4,#0x08,00189$
00189$:
	jnc	00113$
;	../../Common/modules/cIPv6.c:1101: ipv6_address[i] = cipv6_pib.long_address[7-i];
	mov	a,r4
	add	a,r0
	mov	r1,a
	mov	a,#0x07
	clr	c
	subb	a,r4
	add	a,#(_cipv6_pib + 0x0002)
	mov	dpl,a
	clr	a
	addc	a,#((_cipv6_pib + 0x0002) >> 8)
	mov	dph,a
	movx	a,@dptr
	mov	r5,a
	mov	@r1,a
;	../../Common/modules/cIPv6.c:1099: for(i=0; i<8; i++)
	inc	r4
	sjmp	00122$
00113$:
;	../../Common/modules/cIPv6.c:1104: *dptr++ =0xfe;
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	mov	a,#0xFE
	lcall	__gptrput
	inc	dptr
	dec	r1
	dec	r1
	mov	@r1,dpl
	inc	r1
	mov	@r1,dph
;	../../Common/modules/cIPv6.c:1105: *dptr++ = 0x80;
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	mov	a,#0x80
	lcall	__gptrput
	inc	dptr
	dec	r1
	dec	r1
	mov	@r1,dpl
	inc	r1
	mov	@r1,dph
;	../../Common/modules/cIPv6.c:1106: for(i=0; i<6; i++)
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	ar4,@r1
	inc	r1
	mov	ar5,@r1
	inc	r1
	mov	ar6,@r1
	mov	r2,#0x06
00128$:
;	../../Common/modules/cIPv6.c:1108: *dptr++ = 0x00;
	mov	dpl,r4
	mov	dph,r5
	mov	b,r6
	clr	a
	lcall	__gptrput
	inc	dptr
	mov	r4,dpl
	mov	r5,dph
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	@r1,ar4
	inc	r1
	mov	@r1,ar5
	inc	r1
	mov	@r1,ar6
	djnz	r2,00128$
;	../../Common/modules/cIPv6.c:1106: for(i=0; i<6; i++)
;	../../Common/modules/cIPv6.c:1110: for(i=0; i<8; i++)
	mov	ar3,r5
	mov	ar2,r6
	mov	r5,#0x00
00129$:
	cjne	r5,#0x08,00193$
00193$:
	jnc	00174$
;	../../Common/modules/cIPv6.c:1112: *dptr++ = ipv6_address[i];
	mov	a,r5
	add	a,r0
	mov	r1,a
	mov	ar6,@r1
	mov	dpl,r4
	mov	dph,r3
	mov	b,r2
	mov	a,r6
	lcall	__gptrput
	inc	dptr
	mov	r4,dpl
	mov	r3,dph
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	@r1,ar4
	inc	r1
	mov	@r1,ar3
	inc	r1
	mov	@r1,ar2
;	../../Common/modules/cIPv6.c:1110: for(i=0; i<8; i++)
	inc	r5
	sjmp	00129$
00174$:
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	@r1,ar4
	inc	r1
	mov	@r1,ar3
	inc	r1
	mov	@r1,ar2
;	../../Common/modules/cIPv6.c:1114: memset(ipv6_address, 0,8);
	mov	ar2,r0
	mov	r3,#0x00
	mov	r4,#0x40
	push	ar0
	mov	a,#0x08
	push	acc
	clr	a
	push	acc
	clr	a
	push	acc
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	_memset
	dec	sp
	dec	sp
	dec	sp
	pop	ar0
;	../../Common/modules/cIPv6.c:1118: if(buf->dst_sa.addr_type == ADDR_802_15_4_PAN_SHORT ||  buf->dst_sa.addr_type == ADDR_802_15_4_PAN_LONG)
	mov	a,_bp
	add	a,#0x15
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	lcall	__gptrget
	mov	r2,a
	cjne	r2,#0x03,00195$
	sjmp	00117$
00195$:
	cjne	r2,#0x04,00196$
	sjmp	00197$
00196$:
	ljmp	00118$
00197$:
00117$:
;	../../Common/modules/cIPv6.c:1121: if(buf->dst_sa.addr_type == ADDR_802_15_4_PAN_LONG)
	cjne	r2,#0x04,00115$
;	../../Common/modules/cIPv6.c:1123: for(i=0;i<8;i++)
	mov	r1,_bp
	inc	r1
	mov	a,#0x03
	add	a,@r1
	mov	r3,a
	clr	a
	inc	r1
	addc	a,@r1
	mov	r4,a
	inc	r1
	mov	ar5,@r1
	inc	r3
	cjne	r3,#0x00,00200$
	inc	r4
00200$:
	mov	a,_bp
	add	a,#0x05
	mov	r1,a
	mov	@r1,#0x00
00133$:
	mov	a,_bp
	add	a,#0x05
	mov	r1,a
	cjne	@r1,#0x08,00201$
00201$:
	jc	00202$
	ljmp	00116$
00202$:
;	../../Common/modules/cIPv6.c:1125: ipv6_address[i] = buf->dst_sa.address[7-i];
	push	ar2
	mov	a,_bp
	add	a,#0x05
	mov	r1,a
	mov	a,@r1
	add	a,r0
	mov	r1,a
	push	ar0
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	a,#0x07
	clr	c
	subb	a,@r0
	pop	ar0
	add	a,r3
	mov	r7,a
	clr	a
	addc	a,r4
	mov	r2,a
	mov	ar6,r5
	mov	dpl,r7
	mov	dph,r2
	mov	b,r6
	lcall	__gptrget
	mov	r7,a
	mov	@r1,a
;	../../Common/modules/cIPv6.c:1123: for(i=0;i<8;i++)
	mov	a,_bp
	add	a,#0x05
	mov	r1,a
	inc	@r1
	pop	ar2
	sjmp	00133$
00115$:
;	../../Common/modules/cIPv6.c:1130: ipv6_address[3]=0xff;
	push	ar2
	mov	a,#0x03
	add	a,r0
	mov	r1,a
	mov	@r1,#0xFF
;	../../Common/modules/cIPv6.c:1131: ipv6_address[4]=0xfe;
	mov	a,#0x04
	add	a,r0
	mov	r1,a
	mov	@r1,#0xFE
;	../../Common/modules/cIPv6.c:1132: ipv6_address[6]=buf->dst_sa.address[1];
	mov	a,#0x06
	add	a,r0
	mov	r1,a
	push	ar0
	mov	r0,_bp
	inc	r0
	mov	a,#0x03
	add	a,@r0
	mov	r3,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r4,a
	inc	r0
	mov	ar5,@r0
	pop	ar0
	inc	r3
	cjne	r3,#0x00,00203$
	inc	r4
00203$:
	mov	a,#0x01
	add	a,r3
	mov	r6,a
	clr	a
	addc	a,r4
	mov	r7,a
	mov	ar2,r5
	mov	dpl,r6
	mov	dph,r7
	mov	b,r2
	lcall	__gptrget
	mov	r6,a
	mov	@r1,a
;	../../Common/modules/cIPv6.c:1133: ipv6_address[7]=buf->dst_sa.address[0];
	mov	a,#0x07
	add	a,r0
	mov	r1,a
	mov	dpl,r3
	mov	dph,r4
	mov	b,r5
	lcall	__gptrget
	mov	r3,a
	mov	@r1,a
;	../../Common/modules/cIPv6.c:1164: return pdTRUE;
	pop	ar2
;	../../Common/modules/cIPv6.c:1133: ipv6_address[7]=buf->dst_sa.address[0];
00116$:
;	../../Common/modules/cIPv6.c:1136: *dptr++ =0xfe;
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	mov	a,#0xFE
	lcall	__gptrput
	inc	dptr
	dec	r1
	dec	r1
	mov	@r1,dpl
	inc	r1
	mov	@r1,dph
;	../../Common/modules/cIPv6.c:1137: *dptr++ = 0x80;
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	dpl,@r1
	inc	r1
	mov	dph,@r1
	inc	r1
	mov	b,@r1
	mov	a,#0x80
	lcall	__gptrput
	inc	dptr
	dec	r1
	dec	r1
	mov	@r1,dpl
	inc	r1
	mov	@r1,dph
;	../../Common/modules/cIPv6.c:1139: for(i=0; i<6; i++)
	mov	a,_bp
	add	a,#0x06
	mov	r1,a
	mov	ar3,@r1
	inc	r1
	mov	ar4,@r1
	inc	r1
	mov	ar5,@r1
	mov	r6,#0x06
00139$:
;	../../Common/modules/cIPv6.c:1141: *dptr++ = 0x00;
	mov	dpl,r3
	mov	dph,r4
	mov	b,r5
	clr	a
	lcall	__gptrput
	inc	dptr
	mov	r3,dpl
	mov	r4,dph
	djnz	r6,00139$
;	../../Common/modules/cIPv6.c:1139: for(i=0; i<6; i++)
;	../../Common/modules/cIPv6.c:1144: for(i=0; i<8; i++)
	mov	r6,#0x00
00140$:
	cjne	r6,#0x08,00206$
00206$:
	jnc	00177$
;	../../Common/modules/cIPv6.c:1146: *dptr++ = ipv6_address[i];
	mov	a,r6
	add	a,r0
	mov	r1,a
	mov	ar7,@r1
	mov	dpl,r3
	mov	dph,r4
	mov	b,r5
	mov	a,r7
	lcall	__gptrput
	inc	dptr
	mov	r3,dpl
	mov	r4,dph
;	../../Common/modules/cIPv6.c:1144: for(i=0; i<8; i++)
	inc	r6
	sjmp	00140$
00177$:
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	@r0,ar3
	inc	r0
	mov	@r0,ar4
	inc	r0
	mov	@r0,ar5
00118$:
;	../../Common/modules/cIPv6.c:1149: if(buf->dst_sa.addr_type == ADDR_BROADCAST)
	cjne	r2,#0x08,00121$
;	../../Common/modules/cIPv6.c:1151: *dptr++ =0xff;
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,#0xFF
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
;	../../Common/modules/cIPv6.c:1152: *dptr++ = 0x02;	
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,#0x02
	lcall	__gptrput
	inc	dptr
	dec	r0
	dec	r0
	mov	@r0,dpl
	inc	r0
	mov	@r0,dph
;	../../Common/modules/cIPv6.c:1153: for(i=0; i<13; i++)
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	ar2,@r0
	inc	r0
	mov	ar3,@r0
	inc	r0
	mov	ar4,@r0
	mov	r5,#0x0D
00146$:
;	../../Common/modules/cIPv6.c:1155: *dptr++ = 0x00;
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	clr	a
	lcall	__gptrput
	inc	dptr
	mov	r2,dpl
	mov	r3,dph
	djnz	r5,00146$
;	../../Common/modules/cIPv6.c:1153: for(i=0; i<13; i++)
;	../../Common/modules/cIPv6.c:1157: *dptr++ = 0x01;
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,#0x01
	lcall	__gptrput
00121$:
;	../../Common/modules/cIPv6.c:1160: buf->from = MODULE_CIPV6;
	mov	a,_bp
	add	a,#0x18
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,#0x01
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:1161: buf->to = MODULE_NONE;
	mov	r0,_bp
	inc	r0
	mov	a,#0x1E
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	clr	a
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:1162: stack_buffer_push(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_push
;	../../Common/modules/cIPv6.c:1164: return pdTRUE;
	mov	dpl,#0x01
00147$:
	mov	sp,_bp
	pop	_bp
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'parse_ipv_header'
;------------------------------------------------------------
;buf                       Allocated to stack - offset 1
;ind                       Allocated to stack - offset 4
;ip_version                Allocated to registers r2 
;hoplimit                  Allocated to stack - offset 5
;next_header               Allocated to stack - offset 6
;i                         Allocated to stack - offset 7
;dest_match                Allocated to stack - offset 8
;destination               Allocated to stack - offset 9
;sloc0                     Allocated to stack - offset 25
;sloc1                     Allocated to stack - offset 28
;------------------------------------------------------------
;	../../Common/modules/cIPv6.c:1172: void parse_ipv_header(buffer_t *buf)
;	-----------------------------------------
;	 function parse_ipv_header
;	-----------------------------------------
_parse_ipv_header:
	push	_bp
	mov	_bp,sp
	push	dpl
	push	dph
	push	b
	mov	a,sp
	add	a,#0x1e
	mov	sp,a
;	../../Common/modules/cIPv6.c:1174: uint8_t ind=0, ip_version,hoplimit=0, next_header=0, i, dest_match=0;
	mov	a,_bp
	add	a,#0x08
	mov	r0,a
	mov	@r0,#0x00
;	../../Common/modules/cIPv6.c:1176: ind = buf->buf_ptr;
	mov	r0,_bp
	inc	r0
	mov	a,_bp
	add	a,#0x1c
	mov	r1,a
	mov	a,#0x20
	add	a,@r0
	mov	@r1,a
	clr	a
	inc	r0
	addc	a,@r0
	inc	r1
	mov	@r1,a
	inc	r0
	inc	r1
	mov	a,@r0
	mov	@r1,a
	mov	a,_bp
	add	a,#0x1c
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	__gptrget
	mov	r2,a
	inc	dptr
	lcall	__gptrget
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	@r0,ar2
;	../../Common/modules/cIPv6.c:1177: ind++;
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	inc	@r0
;	../../Common/modules/cIPv6.c:1179: ip_version = buf->buf[ind++];
	mov	r0,_bp
	inc	r0
	mov	a,#0x2C
	add	a,@r0
	mov	r5,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	ar2,@r0
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	inc	@r0
	mov	a,r2
	add	a,r5
	mov	r2,a
	clr	a
	addc	a,r3
	mov	r3,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
;	../../Common/modules/cIPv6.c:1180: if( ip_version == 0x06 )
	cjne	r2,#0x06,00148$
	sjmp	00149$
00148$:
	ljmp	00122$
00149$:
;	../../Common/modules/cIPv6.c:1186: ind +=5;
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,#0x05
	add	a,@r0
	mov	@r0,a
;	../../Common/modules/cIPv6.c:1187: next_header = buf->buf[ind++];
	mov	r0,_bp
	inc	r0
	mov	a,#0x2C
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	ar5,@r0
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	inc	@r0
	mov	a,r5
	add	a,r2
	mov	r5,a
	clr	a
	addc	a,r3
	mov	r6,a
	mov	ar7,r4
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	lcall	__gptrget
	mov	r5,a
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	mov	@r0,ar5
;	../../Common/modules/cIPv6.c:1188: hoplimit= buf->buf[ind++];
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	ar5,@r0
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	inc	@r0
	mov	a,r5
	add	a,r2
	mov	r2,a
	clr	a
	addc	a,r3
	mov	r3,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	__gptrget
	mov	r2,a
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	@r0,ar2
;	../../Common/modules/cIPv6.c:1189: hoplimit--;
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	dec	@r0
;	../../Common/modules/cIPv6.c:1190: ind +=16;
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,#0x10
	add	a,@r0
	mov	@r0,a
;	../../Common/modules/cIPv6.c:1244: buf=0;
;	../../Common/modules/cIPv6.c:1191: for(i=0; i<16; i++)
	mov	a,_bp
	add	a,#0x09
	mov	r0,a
	mov	r1,_bp
	inc	r1
	mov	a,#0x2C
	add	a,@r1
	mov	r2,a
	clr	a
	inc	r1
	addc	a,@r1
	mov	r3,a
	inc	r1
	mov	ar4,@r1
	mov	a,_bp
	add	a,#0x04
	mov	r1,a
	push	ar0
	mov	a,_bp
	add	a,#0x19
	mov	r0,a
	mov	a,@r1
	mov	@r0,a
	pop	ar0
	mov	a,_bp
	add	a,#0x07
	mov	r1,a
	mov	@r1,#0x00
00125$:
	mov	a,_bp
	add	a,#0x07
	mov	r1,a
	cjne	@r1,#0x10,00150$
00150$:
	jnc	00147$
;	../../Common/modules/cIPv6.c:1193: destination[15-i] = buf->buf[ind++];
	mov	a,_bp
	add	a,#0x07
	mov	r1,a
	mov	a,#0x0F
	clr	c
	subb	a,@r1
	add	a,r0
	mov	r1,a
	push	ar0
	mov	a,_bp
	add	a,#0x19
	mov	r0,a
	mov	ar6,@r0
	mov	a,_bp
	add	a,#0x19
	mov	r0,a
	inc	@r0
	mov	a,r6
	add	a,r2
	mov	r6,a
	clr	a
	addc	a,r3
	mov	r7,a
	mov	ar5,r4
	mov	dpl,r6
	mov	dph,r7
	mov	b,r5
	lcall	__gptrget
	mov	r6,a
	mov	@r1,a
;	../../Common/modules/cIPv6.c:1191: for(i=0; i<16; i++)
	mov	a,_bp
	add	a,#0x07
	mov	r1,a
	inc	@r1
	pop	ar0
	sjmp	00125$
00147$:
	mov	a,_bp
	add	a,#0x19
	mov	r1,a
	push	ar0
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	a,@r1
	mov	@r0,a
	pop	ar0
;	../../Common/modules/cIPv6.c:1195: if(destination[15] == 0xfe && destination[14] == 0x80)
	mov	a,#0x0F
	add	a,r0
	mov	r1,a
	mov	ar2,@r1
	cjne	r2,#0xFE,00152$
	sjmp	00153$
00152$:
	ljmp	00110$
00153$:
	mov	a,#0x0E
	add	a,r0
	mov	r2,a
	push	ar0
	mov	r0,ar2
	mov	ar2,@r0
	pop	ar0
	cjne	r2,#0x80,00154$
	sjmp	00155$
00154$:
	ljmp	00110$
00155$:
;	../../Common/modules/cIPv6.c:1200: if(destination[3] == 0xfe && destination[3] == 0xff)
	mov	a,#0x03
	add	a,r0
	mov	r2,a
	push	ar0
	mov	r0,ar2
	mov	ar2,@r0
	pop	ar0
	cjne	r2,#0xFE,00106$
	cjne	r2,#0xFF,00106$
;	../../Common/modules/cIPv6.c:1202: if(memcmp(destination, cipv6_pib.short_address, 2) ==0)
	mov	ar2,r0
	mov	r3,#0x00
	mov	r4,#0x40
	push	ar0
	push	ar1
	mov	a,#0x02
	push	acc
	clr	a
	push	acc
	mov	a,#(_cipv6_pib + 0x000a)
	push	acc
	mov	a,#((_cipv6_pib + 0x000a) >> 8)
	push	acc
	clr	a
	push	acc
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	_memcmp
	mov	r2,dpl
	mov	r3,dph
	mov	a,sp
	add	a,#0xfb
	mov	sp,a
	pop	ar1
	pop	ar0
	mov	a,r2
	orl	a,r3
	jnz	00110$
;	../../Common/modules/cIPv6.c:1203: dest_match=1;
	push	ar0
	mov	a,_bp
	add	a,#0x08
	mov	r0,a
	mov	@r0,#0x01
	pop	ar0
	sjmp	00110$
00106$:
;	../../Common/modules/cIPv6.c:1207: if(memcmp(destination, cipv6_pib.long_address, 8) ==0)
	mov	ar2,r0
	mov	r3,#0x00
	mov	r4,#0x40
	push	ar0
	push	ar1
	mov	a,#0x08
	push	acc
	clr	a
	push	acc
	mov	a,#(_cipv6_pib + 0x0002)
	push	acc
	mov	a,#((_cipv6_pib + 0x0002) >> 8)
	push	acc
	clr	a
	push	acc
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	_memcmp
	mov	r2,dpl
	mov	r3,dph
	mov	a,sp
	add	a,#0xfb
	mov	sp,a
	pop	ar1
	pop	ar0
	mov	a,r2
	orl	a,r3
	jnz	00110$
;	../../Common/modules/cIPv6.c:1208: dest_match=1;
	push	ar0
	mov	a,_bp
	add	a,#0x08
	mov	r0,a
	mov	@r0,#0x01
	pop	ar0
00110$:
;	../../Common/modules/cIPv6.c:1212: if((destination[15] == 0xff && destination[14] == 0x02) && destination[0] == 0x01)
	mov	ar2,@r1
	cjne	r2,#0xFF,00113$
	mov	a,#0x0E
	add	a,r0
	mov	r1,a
	mov	ar2,@r1
	cjne	r2,#0x02,00113$
	mov	ar2,@r0
	cjne	r2,#0x01,00113$
;	../../Common/modules/cIPv6.c:1217: dest_match=1;
	mov	a,_bp
	add	a,#0x08
	mov	r0,a
	mov	@r0,#0x01
00113$:
;	../../Common/modules/cIPv6.c:1220: buf->options.lowpan_compressed = 0;
	mov	r0,_bp
	inc	r0
	mov	a,#0x26
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	a,#0x05
	add	a,r2
	mov	r5,a
	clr	a
	addc	a,r3
	mov	r6,a
	mov	ar7,r4
	mov	dpl,r5
	mov	dph,r6
	mov	b,r7
	clr	a
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:1221: if(next_header==NEXT_HEADER_ICMP6) buf->options.hop_count = 1;
	mov	a,_bp
	add	a,#0x06
	mov	r0,a
	cjne	@r0,#0x3A,00117$
	mov	a,#0x04
	add	a,r2
	mov	r2,a
	clr	a
	addc	a,r3
	mov	r3,a
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,#0x01
	lcall	__gptrput
00117$:
;	../../Common/modules/cIPv6.c:1222: if(hoplimit > 0 && dest_match)
	mov	a,_bp
	add	a,#0x05
	mov	r0,a
	mov	a,@r0
	jz	00122$
	mov	a,_bp
	add	a,#0x08
	mov	r0,a
	mov	a,@r0
	jz	00122$
;	../../Common/modules/cIPv6.c:1224: buf->buf_ptr = ind; /*cut header*/
	mov	a,_bp
	add	a,#0x04
	mov	r0,a
	mov	ar2,@r0
	mov	r3,#0x00
	mov	a,_bp
	add	a,#0x1c
	mov	r0,a
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	mov	a,r2
	lcall	__gptrput
	inc	dptr
	mov	a,r3
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:1225: buf->to = MODULE_NONE;
	mov	r0,_bp
	inc	r0
	mov	a,#0x1E
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	clr	a
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:1226: buf->from = MODULE_CIPV6;
	mov	r0,_bp
	inc	r0
	mov	a,#0x1D
	add	a,@r0
	mov	r2,a
	clr	a
	inc	r0
	addc	a,@r0
	mov	r3,a
	inc	r0
	mov	ar4,@r0
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	mov	a,#0x01
	lcall	__gptrput
;	../../Common/modules/cIPv6.c:1227: stack_buffer_push(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_push
;	../../Common/modules/cIPv6.c:1228: buf=0;
	mov	r0,_bp
	inc	r0
	clr	a
	mov	@r0,a
	inc	r0
	mov	@r0,a
	inc	r0
	mov	@r0,a
00122$:
;	../../Common/modules/cIPv6.c:1238: if(buf)
	mov	r0,_bp
	inc	r0
	mov	a,@r0
	inc	r0
	orl	a,@r0
	inc	r0
	orl	a,@r0
	jz	00129$
;	../../Common/modules/cIPv6.c:1243: stack_buffer_free(buf);
	mov	r0,_bp
	inc	r0
	mov	dpl,@r0
	inc	r0
	mov	dph,@r0
	inc	r0
	mov	b,@r0
	lcall	_stack_buffer_free
;	../../Common/modules/cIPv6.c:1244: buf=0;
00129$:
	mov	sp,_bp
	pop	_bp
	ret
;------------------------------------------------------------
;Allocation info for local variables in function 'compare_ori_to_own'
;------------------------------------------------------------
;address                   Allocated to stack - offset -5
;type                      Allocated to registers r2 
;------------------------------------------------------------
;	../../Common/modules/cIPv6.c:1248: portCHAR compare_ori_to_own(addrtype_t type, address_t address)
;	-----------------------------------------
;	 function compare_ori_to_own
;	-----------------------------------------
_compare_ori_to_own:
	push	_bp
	mov	_bp,sp
	mov	r2,dpl
;	../../Common/modules/cIPv6.c:1250: if(type==ADDR_802_15_4_PAN_LONG)
	cjne	r2,#0x04,00106$
;	../../Common/modules/cIPv6.c:1252: if(memcmp(address,cipv6_pib.long_address , 8)==0)
	mov	a,_bp
	add	a,#0xfb
	mov	r0,a
	mov	ar2,@r0
	inc	r0
	mov	ar3,@r0
	inc	r0
	mov	ar4,@r0
	mov	a,#0x08
	push	acc
	clr	a
	push	acc
	mov	a,#(_cipv6_pib + 0x0002)
	push	acc
	mov	a,#((_cipv6_pib + 0x0002) >> 8)
	push	acc
	clr	a
	push	acc
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	_memcmp
	mov	r2,dpl
	mov	r3,dph
	mov	a,sp
	add	a,#0xfb
	mov	sp,a
	mov	a,r2
	orl	a,r3
	jnz	00107$
;	../../Common/modules/cIPv6.c:1253: return pdTRUE;
	mov	dpl,#0x01
	sjmp	00108$
00106$:
;	../../Common/modules/cIPv6.c:1257: if(memcmp(address,cipv6_pib.short_address ,2)==0)
	mov	a,_bp
	add	a,#0xfb
	mov	r0,a
	mov	ar2,@r0
	inc	r0
	mov	ar3,@r0
	inc	r0
	mov	ar4,@r0
	mov	a,#0x02
	push	acc
	clr	a
	push	acc
	mov	a,#(_cipv6_pib + 0x000a)
	push	acc
	mov	a,#((_cipv6_pib + 0x000a) >> 8)
	push	acc
	clr	a
	push	acc
	mov	dpl,r2
	mov	dph,r3
	mov	b,r4
	lcall	_memcmp
	mov	r2,dpl
	mov	r3,dph
	mov	a,sp
	add	a,#0xfb
	mov	sp,a
	mov	a,r2
	orl	a,r3
	jnz	00107$
;	../../Common/modules/cIPv6.c:1258: return pdTRUE;
	mov	dpl,#0x01
	sjmp	00108$
00107$:
;	../../Common/modules/cIPv6.c:1260: return pdFALSE;
	mov	dpl,#0x00
00108$:
	pop	_bp
	ret
	.area CSEG    (CODE)
	.area CONST   (CODE)
	.area XINIT   (CODE)
	.area CABS    (ABS,CODE)
